Loading lesson path
Concept visual
Start at both ends
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
SQL Server (starting with 2008), Azure SQL Database, Azure SQL Data Warehouse, Parallel Data Warehouse
❮ SQL Server Functions