When an EXECUTE AS statement is run, the execution context of the session is switched to the specified login or user name. This will help database administrator to check the different user permissions. `Execute As` is also very helpful when a user wants to execute a stored procedure in the context of another user.
Syntax
Execute as user = 'SQL_JShah'
select * from CompanyProducts.Products
No comments:
Post a Comment