Retrieve the login name of the current user.
SELECT SYSTEM_USER; |
The SYSTEM_USER function retrieves the login name of the current user in the database.
SYSTEM_USER |
Works in: |
SQL Server (from 2008 onward), Azure SQL Database, Azure SQL Data Warehouse, and Parallel Data Warehouse |