|
Category: ASE: Functions: User, Login and Role Functions
suser_id()
The
user function
suser_id()
returns the unique identifier (id), stored in the
systemtable
syslogins,
of the user declared in the parameter "login_name".
"suser" is short for "server user".
Syntax of the User Function suser_id()
The parameter of the User Function suser_id()
login_name
The parameter "login_name" is a placeholder for a
login name,
i.e. the name of the user added with the
system procedure
sp_addlogin,
and which is stored in the system table syslogins. The parameter "login_name"
must be set in quotes.
Example for the User Function suser_id()
select suser_id()
go
-----
1
Returns the id of the currently logged in user.
select suser_id("login_name_x")
go
-----
153
Returns the id (153) of the user "login_name_x".
setuser,
sp_addalias,
sp_addgroup,
sp_addlogin,
sp_adduser,
sp_changegroup,
sp_configure "check password for digit",
sp_configure "minimum failed logins",
sp_configure "minimum password length",
sp_configure "systemwide password expiration",
sp_displaylogin,
sp_dropalias,
sp_dropgroup,
sp_droplogin,
sp_dropuser,
sp_helpgroup,
sp_helpuser,
sp_locklogin,
sp_modifylogin,
sp_password,
See also:
ASE T-SQL - Aggregate Functions, ASE T-SQL - User, mut_excl_roles(), proc_role(), role_contain(), role_id(), role_name(), show_role(), suser_name(), user, user_id(), user_name(), valid_name(), valid_user().
|