Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 35.1Mb
PDF (A4) - 35.2Mb
Man Pages (TGZ) - 256.4Kb
Man Pages (Zip) - 361.2Kb
Info (Gzip) - 3.4Mb
Info (Zip) - 3.4Mb
Excerpts from this Manual

MySQL 5.7 Reference Manual  / ...  / SQL Statements  / Data Definition Statements  /  ALTER FUNCTION Statement

13.1.3 ALTER FUNCTION Statement

ALTER FUNCTIONfunc_name [characteristic ...]characteristic: {    COMMENT 'string'  | LANGUAGE SQL  | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }  | SQL SECURITY { DEFINER | INVOKER }}

This statement can be used to change the characteristics of a stored function. More than one change may be specified in anALTER FUNCTION statement. However, you cannot change the parameters or body of a stored function using this statement; to make such changes, you must drop and re-create the function usingDROP FUNCTION andCREATE FUNCTION.

You must have theALTER ROUTINE privilege for the function. (That privilege is granted automatically to the function creator.) If binary logging is enabled, theALTER FUNCTION statement might also require theSUPER privilege, as described inSection 23.7, “Stored Program Binary Logging”.