Applies To: SQL Server 2014, SQL Server 2016 Preview
Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).
Returns the login identification name of the user.
Applies to: SQL Server (SQL Server 2008 through current version), Azure SQL Data Warehouse Public Preview.
In SQL Server version 7.0, the security identification number (SID) replaced the server user identification number (SUID).
SUSER_NAME returns a login name only for a login that has an entry in the syslogins system table.
SUSER_NAME can be used in a select list, in a WHERE clause, and anywhere an expression is allowed, and must always be followed by parentheses, even if no parameter is specified.
The following example returns the login identification name of the user with a login identification number of 1.