IS_MEMBER

Indicates whether the current user is a member of the specified Microsoft Windows group or Querona database role.

Syntax

IS_MEMBER ( { 'group' | 'role' } )

Arguments

group

Is the name of the Windows group that is being checked; must be in the format Domain\Group. group is sysname.

role

Is the name of the Querona role that is being checked. role is sysname and can include the database fixed roles or user-defined roles, but not server roles.

Return types

int

Example

IF IS_MEMBER ('ADVWORKS\Shipping') = 1
   SELECT 'User ' + USER + ' is a member of ADVWORKS\Shipping.';

See Also