Determines whether a specified role is contained within another specified role.
role_contain("role1", "role2")
is the name of a system or user-defined role.
is the name of another system or user-defined role.
select role_contain("intern_role", "doctor_role")
----------- 1
select role_contain("specialist_role", "intern_role")
----------- 0
role_contain, a system function, returns 1 if role1 is contained by role2. Otherwise, role_contain returns 0.
ANSI SQL – Compliance level: Transact-SQL extension.
Any user can execute role_contain.
Documents For more information about contained roles and role hierarchies, see the System Administration Guide. For system functions, see Transact-SQL Users Guide.
Functions mut_excl_roles, proc_role, role_id, role_name
Commands alter role
System procedures sp_activeroles, sp_displayroles, sp_role