role_contain

Description

Returns 1 if role2 contains role1.

Syntax

role_contain("role1", "role2")

Parameters

role1

is the name of a system or user-defined role.

role2

is the name of another system or user-defined role.

Examples

Example 1

select role_contain("intern_role", "doctor_role")
-----------
1

Example 2

select role_contain("specialist_role", "intern_role")
-----------
0

Usage

role_contain, a system function, returns 1 if role1 is contained by role2.

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can execute role_contain.

See also

For more information about system functions, see “System functions”.

Documents For more information about contained roles and role hierarchies, see the System Administration Guide.

Functions mut_excl_roles, proc_role, role_id, role_name

Commands alter role

System procedures sp_activeroles, sp_displayroles, sp_role