You can use the DROP FUNCTION statement to drop a stored function.
Syntax:
DROP FUNCTION [IF EXISTS] sp_name
To drop a stored routine, you must have the ALTER ROUTINE privilege on the routine.
If the stored function does not exist, you can use the IF EXISTS clause to avoid errors and generate a warning. You can use the SHOW WARNINGS statement to view the warning.
Example:
obclient> DROP FUNCTION IF EXISTS my_func;
Query OK, 0 rows affected