Skip to content

SYSTEM_USER

SELECT SYSTEM_USER AS 'CurrentUser';
CurrentUser
-----------
sa

The SYSTEM_USER function in the provided SQL Server query returns the current system user name. In this example, the system user is ‘sa’.