A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  special characters  sybase-tech-blog


Category: ASE: Functions: User, Login and Role Functions

role_contain()

The role function role_contain() verifies if a role ("role_name_1") is contained in another role ("role_name_2"). The function role_contain() returns two different values (0 and 1). If "role_name_1" is contained in "role_name_2" "1" is returned, if not, "0" is returned.

Syntax of the Role Function role_contain()

    role_contain("role_name_1", "role_name_2")
    

The parameters of the Role Function role_contain()

role_name_1, role_name_2
The parameters "role_name_1" and "role_name_2" are placeholders for roles.

Example for the Role Function role_contain()

    select role_contain("role_name_1", "role_name_2")
go
-----
1

The role "role_name_1" is contained in the role "role_name_2".

See also:
alter role,
create role,
drop role,
grant role,
revoke role,
set role,
has_role(),
proc_role(),
mut_excl_roles(),
role_id(),
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_id(),
role_name(),
show_role(),
suser_id(),
suser_name(),
user,
user_id(),
user_name(),
valid_name(),
valid_user().