Returns the name of the current server user or the user whose server ID is specified.
suser_name([server_user_id])
is an Adaptive Server user ID.
select suser_name()
------------------------------ sa
select suser_name(4)
------------------------------ margaret
suser_name, a system function, returns the server user’s name. Server user IDs are stored in syslogins. If no server_user_id is supplied, suser_name returns the name of the current user.
For general information about system functions, see “System functions”.
SQL92 – Compliance level: Transact-SQL extension.
Any user can execute suser_name.