Returns the user’s login identification name. The SUSER_NAME system function is included in Microsoft® SQL Server™ version 7.0 for backward compatibility only. Use SUSER_SNAME instead.
SUSER_NAME([server_user_id])
nchar
In SQL Server 7.0, the security identification number (SID) replaces 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.
System functions can be used in the select list, in the WHERE clause, and anywhere an expression is allowed, and must always be followed by parentheses (even if no parameter is specified).
This example returns the user’s login identification name for a login identification number of 1.
SELECT SUSER_NAME(1)
Managing Security | System Functions |