DROP PROCEDURE

Documentation

VoltDB Home » Documentation » Using VoltDB

DROP PROCEDURE

DROP PROCEDURE — Removes the definition of a stored procedure.

Synopsis

DROP PROCEDURE procedure-name [IF EXISTS]

Description

The DROP PROCEDURE statement deletes the definition of the named stored procedure. Note that, for procedures declared using CREATE PROCEDURE FROM and a class file, the statement does not delete the class that implements the procedure, it only deletes the definition and any partitioning information associated with the procedure. To remove the associated stored procedure class, you must first drop the procedure definition then use the sqlcmd remove classes directive to remove the class.

The IF EXISTS clause allows the statement to succeed even if the specified procedure name does not exist. If the stored procedure does not exist and you do not include the IF EXISTS clause, the statement will return an error.

Examples

The following example removes the definition of the FindCanceledReservations stored procedure, then uses remove classes to remove the corresponding class.

$ sqlcmd
1> DROP PROCEDURE FindCanceledReservations;
2> remove classes "*.FindCanceledReservations";