13.1.7 ALTER PROCEDURE Statement语句

ALTER PROCEDURE proc_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 procedure. 此语句可用于更改存储过程的特征。More than one change may be specified in an ALTER PROCEDURE statement. ALTER PROCEDURE语句中可以指定多个更改。However, you cannot change the parameters or body of a stored procedure using this statement; to make such changes, you must drop and re-create the procedure using DROP PROCEDURE and CREATE PROCEDURE.但是,不能使用此语句更改存储过程的参数或主体;若要进行此类更改,必须使用DROP PROCEDURECREATE PROCEDURE删除并重新创建过程。

You must have the ALTER ROUTINE privilege for the procedure. 您必须具有该过程的ALTER PRODUCTION权限。By default, that privilege is granted automatically to the procedure creator. 默认情况下,该权限自动授予过程创建者。This behavior can be changed by disabling the automatic_sp_privileges system variable. 可以通过禁用automatic_sp_privileges系统变量来更改此行为。See Section 25.2.2, “Stored Routines and MySQL Privileges”.请参阅第25.2.2节,“存储例程和MySQL权限”