Deletes a stored procedure.
DROP PROCEDURE [ IF EXISTS ] name [ ([ [ argmode ] [ argname ] argtype ] [, ...]) ] [ CASCADE | RESTRICT ]
You can use the
DROP PROCEDURE command to delete an existing stored procedure. To run this command on a stored procedure,
you must be a superuser or the owner of the procedure. If the stored procedure is
overloaded, you must specify all input (
IN OUT) argument data types to the procedure. This requirement is not compatible with Oracle
databases. In Oracle, you can only specify procedure names. PolarDB O Edition allow overloading of stored procedure names, so the procedure signature that is given
by the input argument data types is required in the
DROP PROCEDURE command that is run on an overloaded stored procedure in PolarDB O Edition.
RESTRICT is not compatible with Oracle databases, and can be used only by PolarDB O Edition.
|IF EXISTS||Specifies that the system does not report an error if the stored procedure does not exist. The server issues a notice in this case.|
|name||The name of an existing stored procedure. The name can be schema-qualified.|
|argmode||The modes of an argument. The argument modes include
|argname||The name of an argument. Note that
|argtype||The data type of an argument of the stored procedure. Specification of argtype is not compatible with Oracle databases and applies only to PolarDB O Edition.|
|CASCADE||Specifies that all objects that depend on the stored procedure and objects that depend on those objects are automatically dropped.|
|RESTRICT||Specifies that the stored procedure is not dropped if objects depend on it. This is the default behavior.|
DROP PROCEDURE select_emp;