Example
Return the user name of the current user:
SELECT SESSION_USER;
Definition and Usage
The SESSION_USER function returns the name of the current user in the SQL Server database.
Syntax
SESSION_USER
Return the user name of the current user:
SELECT SESSION_USER;
The SESSION_USER function returns the name of the current user in the SQL Server database.
SESSION_USER