CREATE ROLE Statement

Creates a new role, extends an existing user to act as a role, or manages role administrators on a role.

Syntax

CREATE [ OR REPLACE ] ROLE role_name | FOR USER userID
[ WITH ADMIN [ ONLY ] admin_name [,...] ]

Parameters

Note: If you do not specify an ADMIN clause, the default WITH ADMIN ONLY clause is used and the default administrator is the global roles administrator.

Examples

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions