EXECUTE AS : EXEC « Transact SQL « SQL Server / T-SQL Tutorial






Valid options for this statement are described in the following table.
 
Option         Description     
Caller         in the context of the user executing the procedure.     
Self         with default permissions.     
Owner         in the context of the owner of the procedure.     
'user_name'     in the context of a specific user or login.








20.19.EXEC
20.19.1.The syntax of the EXEC statement
20.19.2.EXECUTE AS
20.19.3.Dynamic Selects
20.19.4.A stored procedure with dynamic execution by using EXEC
20.19.5.Sending Variable Information to an EXEC() Call
20.19.6.Switch database in EXEC
20.19.7.Statement Limit
20.19.8.Parse exception in another level of scope: Exception in EXEC
20.19.9.Execute a dynamic statement and return the result with OUTPUT
20.19.10.Use more than one sql statement in EXEC
20.19.11.Insert into with EXEC
20.19.12.Using EXEC () to Execute a Dynamic TOP n Query