IS_MEMBER
security context lookup
What changes
- Input
- security context (login, user, roles, permissions)
- Output or change
- name, id or boolean
- Return type
- int
Syntax at a glance
IS_MEMBER ( { 'group' | 'role' } )
Work example
Check membership in a Windows group or database role in the current database.
Test under the intended execution context. Use GRANT and DENY rather than returned identity text.
Check your work Handle null as indeterminate and separate database roles from server roles.
Open Microsoft Learn for full syntax, permissions, and details for your version.