Define the execution context of a user-defined Procedure, Queue, Trigger or Function (except inline table-valued functions.)
Functions, Stored Procedures, and DML Triggers EXEC[UTE] AS { CALLER | SELF | OWNER | 'user_name' } DDL Triggers with Database Scope EXEC[UTE] AS { CALLER | SELF | 'user_name' } DDL Triggers with Server Scope EXEC[UTE] AS { CALLER | SELF | 'I' } Queues EXEC[UTE] AS { SELF | OWNER | 'user_name' } yntax
CALLER - Execute in the context of the caller of the module.
SELF - Execute in the context of the person creating or altering the module.
OWNER - Execute in the context of the current owner of the module.
Specify a login or user that has the least privileges required to perform the operations defined in the module.
"People have this obsession. They want you to be like you were in 1969. They want you to, because otherwise their youth goes with you. It's very selfish, but it's understandable" ~ Mick Jagger
Related commands:
REVERT
EXECUTE AS
CREATE PROCEDURE