SUSER_SNAME

Returns the login identification name of the user.

Syntax

SUSER_NAME ( [ server_user_id ] )

Arguments

server_user_id

Is the login identification number of the user. server_user_id, which is optional, is int. server_user_id can be the login identification number of any Lyftron login. If server_user_id is not specified, the login identification name for the current user is returned. If the parameter contains the word NULL will return NULL.

Return types

nvarchar(128)

Examples

SELECT SUSER_NAME(1);

See Also