set_appcontext  show_sec_services

Chapter 2: Transact-SQL Functions

show_role

Description

Shows the login’s currently active system-defined roles.

Syntax

show_role()

Parameters

None.

Examples

Example 1

select show_role()
sa_role sso_role oper_role replication_role

Example 2

if charindex("sa_role", show_role()) >0
begin
    print "You have sa_role"
end

Usage

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can execute show_role.

See also

Commands alter role, create role, drop role, grant, set, revoke

Functions proc_role, role_contain

System procedures sp_activeroles, sp_displayroles, sp_role





Copyright © 2005. Sybase Inc. All rights reserved. show_sec_services

View this book as PDF