Skip to content

DROP PROCEDURE

Drop a stored procedure from the database.

DROP PROCEDURE [IF EXISTS] procedure([ [ argname ] argtype [, ...] ])

For example:

premdb=# drop procedure if exists proc1();
DROP PROCEDURE

If you use the IF EXISTS option, ybsql does not return a warning if the view does not exist.

If the procedure has arguments, you must identify them by data type or by name and type. For example, either of the following commands would work for a procedure named addteam with one VARCHAR argument:

premdb=# drop procedure addteam(varchar(30));
DROP PROCEDURE
premdb=# drop procedure addteam(name varchar(30));
DROP PROCEDURE

You must drop a procedure from the database where it was created.

Parent topic:SQL Commands