Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 36.3Mb
PDF (A4) - 36.3Mb
PDF (RPM) - 36.2Mb
HTML Download (TGZ) - 10.4Mb
HTML Download (Zip) - 10.4Mb
HTML Download (RPM) - 9.2Mb
Man Pages (TGZ) - 224.6Kb
Man Pages (Zip) - 332.7Kb
Info (Gzip) - 3.3Mb
Info (Zip) - 3.3Mb
Excerpts from this Manual

MySQL 5.7 Reference Manual  /  ...  /  DROP FUNCTION Statement for User-Defined Functions

13.7.3.2 DROP FUNCTION Statement for User-Defined Functions

DROP FUNCTION [IF EXISTS] function_name

This statement drops the user-defined function (UDF) named function_name. (DROP FUNCTION is also used to drop stored functions; see Section 13.1.27, “DROP PROCEDURE and DROP FUNCTION Statements”.)

DROP FUNCTION is the complement of CREATE FUNCTION. It requires the DELETE privilege for the mysql system database because it removes the row from the mysql.func system table that registers the function.

During the normal startup sequence, the server loads UDFs registered in the mysql.func table. Because DROP FUNCTION removes the mysql.func row for the dropped function, the server does not load the function during subsequent restarts.

Note

To upgrade the shared library associated with a UDF, issue a DROP FUNCTION statement, upgrade the shared library, and then issue a CREATE FUNCTION statement. If you upgrade the shared library first and then use DROP FUNCTION, the server may unexpectedly shut down.