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 an ALTER FUNCTION
statement. ALTER FUNCTION
语句中可以指定多个更改。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 using 但是,不能使用此语句更改存储函数的参数或函数体;要进行此类更改,必须使用DROP FUNCTION
and CREATE FUNCTION
.DROP FUNCTION
和CREATE FUNCTION
删除并重新创建函数。
You must have the 您必须具有函数的ALTER ROUTINE
privilege for the function. ALTER ROUTINE
权限。(That privilege is granted automatically to the function creator.) (该特权自动授予函数创建者。)If binary logging is enabled, the 如果启用了二进制日志记录,ALTER FUNCTION
statement might also require the SUPER
privilege, as described in Section 25.7, “Stored Program Binary Logging”.ALTER FUNCTION
语句可能还需要超级权限,如第25.7节,“存储程序二进制日志记录”所述。