16.4 Deleting a stored procedure or stored function

Organization of this section
(1) Deleting a stored procedure
(2) Deleting a stored function

(1) Deleting a stored procedure

DROP PROCEDURE is used to delete a stored procedure.

(2) Deleting a stored function

DROP FUNCTION is used to delete a stored function.

(a) When a stored function is deleted, an existing stored function may be invalidated

When a stored function is deleted, an existing stored function may become invalid. A stored function that satisfies the following condition becomes invalid:

In this case, use ALTER ROUTINE to re-create the invalidated stored function.

(b) When a stored function is deleted, an existing stored procedure may be invalidated

When a stored function is deleted, an existing stored procedure may become invalid. An existing stored procedure that satisfies the following condition becomes invalid:

In this case, use the ALTER PROCEDURE statement or ALTER ROUTINE to re-create the invalidated stored procedure.

(c) When a stored function is deleted, an existing trigger may be invalidated

When a stored function is deleted, an existing trigger may become invalid. An existing trigger that satisfies the following condition becomes invalid:

In this case, use the ALTER TRIGGER statement or ALTER ROUTINE to re-create the invalidated trigger.