ALTER PROCEDURE v17
Name
ALTER PROCEDURE — Modify an existing 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
The (possibly schema-qualified) name of a stored procedure.
options can be:
[EXTERNAL] SECURITY DEFINERSpecify
SECURITY DEFINERto 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 execute the procedure with the privileges of the user that's invoking the procedure. TheEXTERNALkeyword is accepted for compatibility but ignored.
The RESTRICT keyword is accepted for compatibility but ignored.
Examples
This command specifies for the update_balance to execute with the privileges of the user invoking the procedure:
ALTER PROCEDURE update_balance SECURITY INVOKER;