REVERT
Use the REVERT command to reset the CURRENT USER of the session back to the previous EXECUTE AS user; if none, then revert to the SESSION USER.
Synopsis
Syntax
for using the command:
REVERT
Inputs
None.
Outputs
The REVERT command has the following
outputs:
| Output | Description |
|---|---|
| REVERT | The message that the system returns if the command is successful. |
| ERROR: REVERT without preceding EXECUTE AS. | You must run a successful EXECUTE AS command to run a REVERT. |
Description
The REVERT command has the following
characteristics:
- Privileges required
- No specific privilege is needed to issue this statement. However, you must have EXECUTE AS privilege on the current user to need a REVERT statement.
- Common tasks
- Reset the CURRENT USER of the session back to the previous EXECUTE AS user.
Usage
The
following provides sample usage:
REVERT;