ALTER PROCEDUREproc_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 PROCEDURE
和CREATE 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权限”。