13.1.4 ALTER FUNCTION Statement语句

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. 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 FUNCTIONCREATE 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节,“存储程序二进制日志记录”所述。