Returns the role ID of the specified role name.
role_id("role_name")
is the name of a system or user-defined role. Role names and role IDs are stored in the syssrvroles system table.
Returns the system role ID of sa_role:
select role_id("sa_role")
------ 0
Returns the system role ID of the “intern_role”:
select role_id("intern_role")
------ 6
role_id, a system function, returns the system role ID (srid). System role IDs are stored in the srid column of the syssrvroles system table.
If the role_name is not a valid role in the system, Adaptive Server returns NULL.
ANSI SQL – Compliance level: Transact-SQL extension.
Any user can execute role_id.
Documents For more information about .
Roles – see the System Administration Guide
System functions – see Transact-SQL Users Guide.
Functions mut_excl_roles,proc_role,role_contain, role_name