DROP ROLE Statement

Removes a user-defined role from the database or converts a user-extended role to a regular user.

Syntax

DROP ROLE [ FROM USER ] role_name
[ WITH REVOKE ]
[ WITH DROP OBJECTS ]

Parameters

Examples

Usage

A user-defined role can be dropped from the database or converted back to a regular user at any time as long as all dependent roles left meet the minimum required number of administrative users with active passwords.

Include the FROM USER clause when dropping a user-extended role to convert it back to act as a regular user rather than remove it from the database. The user retains any login privileges, system privileges, and roles granted to the user-extended role and becomes the owner of any objects owned by the user-extended role. Any users granted to the user-extended are immediately revoked.

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions