Removes a procedure from the database.
DROP PROCEDURE [ IF EXISTS ] [ owner.]procedure-name
Use the IF EXISTS clause if you do not want an error returned when the DROP PROCEDURE statement attempts to remove a procedure that does not exist.
You must be the owner of the procedure, or have the DROP ANY PROCEDURE or DROP ANY OBJECT system privilege.
Automatic commit.
Core Feature. The IF EXISTS clause is not in the standard.
This example creates a procedure called NewDepartment, and then drops it. To run this example, you must also have the CREATE PROCEDURE privilege.
CREATE PROCEDURE NewDepartment( IN id INT, IN name CHAR(35), IN head_id INT ) BEGIN INSERT INTO GROUPO.Departments ( DepartmentID, DepartmentName, DepartmentHeadID ) VALUES ( id, name, head_id ); END; DROP PROCEDURE NewDepartment;