Dropping Procedures

From InterBase
Jump to: navigation, search

Go Up to Altering and Dropping Stored Procedures


The DROP PROCEDURE statement deletes an existing stored procedure from the database. DROP PROCEDURE can be used interactively with isql or in a data definition file.

The following restrictions apply to dropping procedures:

  • Only SYSDBA and the owner of a procedure can drop it.
  • You can’t drop a procedure used by other procedures, triggers, or views; alter the other metadata object so that it does not reference the procedure, then drop the procedure.
  • You can’t drop a procedure that is recursive or in a cyclical dependency with another procedure; you must alter the procedure to remove the cyclical dependency, then drop the procedure.
  • You can’t drop a procedure that is currently in use by an active transaction; commit the transaction, then drop the procedure.
  • You can’t drop a procedure with embedded SQL; use dynamic SQL.

If you attempt to drop a procedure and receive an error, make sure you have entered the procedure name correctly.

Advance To: