ALTER FUNCTION func_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. 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.
该语句可用于更改存储函数的特征。在ALTER FUNCTION语句中可以指定多个更改。但是,不能使用此语句更改存储函数的参数或函数体;要进行此类更改,必须使用drop function和CREATE function删除并重新创建函数。
You must have the ALTER ROUTINE privilege for the function. (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 ROUTINE权限。(该特权会自动授予函数创建者。)如果启用了二进制日志记录,那么ALTER FUNCTION语句也可能需要SUPER权限,如第25.7节“存储的程序二进制日志记录”所述。