Reporting Current User and Login Context : SYSTEM_USER « System Functions « SQL Server / T-SQL Tutorial






The SYSTEM_USER function returns the Windows or SQL login name.
The USER function returns the current user's database user name.
6>
7> SELECT SYSTEM_USER -- Login
8> GO


------------------------------------------------------------------------------------------------------------------------
--------
BCE67B1242DE45A\Administrator


(1 rows affected)








25.59.SYSTEM_USER
25.59.1.Reporting Current User and Login Context
25.59.2.select SYSTEM_USER
25.59.3.Use SYSTEM_USER as a default value