
Explanation:
Box 1: USER
Using EXECUTE AS and REVERT to switch context.
The following example creates a context execution stack using multiple principals. The REVERT statement is then used to reset the execution context to the previous caller.
**
EXECUTE AS USER = 'user2';
--The following REVERT statements will reset the execution context to the previous context.
REVERT;
**
Box 2: REVERT
Reference:
https://docs.microsoft.com/en-us/sql/t-sql/statements/execute-as-transact-sql?view=sql-server-ver15
https://docs.microsoft.com/en-us/sql/t-sql/functions/suser-sname-transact-sql?view=sql-server-ver15