Returns the system role ID of the name you specify.
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.
For more information about system functions, see “System functions”.
Documents For more information about roles, see the System Administration Guide.
Functions mut_excl_roles,proc_role,role_contain, role_name