|
Category: ASE: Functions: User, Login and Role Functions
role_id()
The
role function
role_id()
returns the id of the
role
declared in the parameter "role_name". The
function
role_id() is based on
data
stored in the
system table
syssrvroles
Syntax of the Role Function role_id()
The parameter of the Role Function role_id()
role_name
The parameter "role_name" is a placeholder for a role name.
Example for the Role Function role_id()
select role_id("sa_role")
go
-----
0
Returns the id "0" for the role "sa_role".
By querying the system table master..syssrvroles all ids and their corresponding
role names can be displayed.
select srid, name from master..syssrvroles
See also:
alter role,
create role,
drop role,
grant role,
revoke role,
set role,
has_role(),
proc_role(),
mut_excl_roles(),
role contain(),
role_name(),
show_role(),
sp_activeroles,
sp_displayroles,
sp_role,
suser_id(),
suser_name(),
user,
user_id(),
user_name(),
valid_user()
and
Functions.
See also:
ASE T-SQL - Aggregate Functions, ASE T-SQL - User, mut_excl_roles(), proc_role(), role_contain(), role_name(), show_role(), suser_id(), suser_name(), user, user_id(), user_name(), valid_name(), valid_user().
|