Subject | Re: [firebird-support] How to drop an procedure only if exists... |
---|---|
Author | Lucas Franzen |
Post date | 2006-01-17T17:36:41Z |
adrian_avila_mtz schrieb:
If you use Firebird you can also use the CREATE OR ALTER PROCEDURE
command to first create the procedure (if it does exist it will be
altered) and then drop it.
Luc.
> I have an update script to be aplied automatic that need to drop aYou can check the RDB$PROCEDURES table to see if the stroed proc is there.
> procedure, some of the DB have the procedure named 'UTIL01' if the
> procedure exists there is no problem, but if it doesn't exists it gets
> an error and since the update must be clean and automatic I need to
> used the drop procedure sentence only if the procedure exists to don't
> get the error in the update.
>
> Any ideas?
If you use Firebird you can also use the CREATE OR ALTER PROCEDURE
command to first create the procedure (if it does exist it will be
altered) and then drop it.
Luc.