ALTER PROCEDURE v13
Name
ALTER PROCEDURE
Synopsis
ALTER PROCEDURE <procedure_name> <options> [RESTRICT]
Description
Use the ALTER PROCEDURE statement to specify that a procedure is a SECURITY INVOKER or SECURITY DEFINER.
Parameters
procedure_name
procedure_name specifies the (possibly schema-qualified) name of a stored procedure.
options may be:
[EXTERNAL] SECURITY DEFINERSpecify
SECURITY DEFINERto instruct the server to execute the procedure with the privileges of the user that created the procedure. TheEXTERNALkeyword is accepted for compatibility, but ignored.[EXTERNAL] SECURITY INVOKERSpecify
SECURITY INVOKERto instruct the server to execute the procedure with the privileges of the user that is invoking the procedure. TheEXTERNALkeyword is accepted for compatibility, but ignored.
The RESTRICT keyword is accepted for compatibility, but ignored.
Examples
The following command specifies that the update_balance procedure should execute with the privileges of the user invoking the procedure:
ALTER PROCEDURE update_balance SECURITY INVOKER;
See Also