SUSER_NAME function [System]

Returns the user name for the specified user ID.

Syntax
SUSER_NAME( [ user-id ] )
Parameters
  • user-id   The user ID of the user you are searching for.

Returns

LONG VARCHAR

Remarks

If you do not specify user-id, the user name of the current user is returned.

See also
Standards and compatibility
  • SQL/2003   Transact-SQL extension.

Example

The following statement returns the user name for a user with ID 101.

SELECT SUSER_NAME( 101 );