SQL Server SESSION_USER Function
Example
Return the user name of the current session in the SQL Server database:
SELECT SESSION_USER;
Try it Yourself »
Definition and Usage
The SESSION_USER function return the user name of the current session in the SQL Server database.
Syntax
SESSION_USER
Technical Details
Works in: | SQL Server 2014, SQL Server 2012, SQL Server 2008 R2, SQL Server 2008, SQL Server 2005 |
---|