Skip to content
Developer Edition runs on one host and does not require a product license file. Need multi-host deployment or performance testing at scale? Explore Enterprise Edition

DROP ROLE

DROP ROLE deletes one or more roles from the current service group.

Prerequisites

First connect to the Graph service. Run the command in a GQL client.

To drop a role, you must own the role or have ADMIN in the current service group.

Warning

Dropping a role revokes it from every user and deletes the privileges stored in that role. It does not delete privileges granted directly to users or through other roles.

Syntax

drop_role_command
DROP ROLE IF EXISTS role_name ,

drop_role_command ::=
    'DROP' 'ROLE' ('IF EXISTS')? role_name (',' role_name)*

Parameters

IF EXISTS

Skip missing roles and delete the other specified roles. Without this clause, any missing role causes an error.

role_name

The name of the role to be dropped.

Examples

The example uses an existing role named role1.

DROP ROLE role1

Check SHOW ALL ROLES. The result should no longer include role1.