DROP ROLE

Syntax

DROP ROLE role_name;

Description

Drops a Custom Role within the Organization. Built-in roles cannot be dropped.

A role that is the owner of any objects cannot be dropped. Use GRANT OWNERSHIP to transfer ownership of the object to another role first.

A role cannot be dropped if it is granted any other roles. Use REVOKE ROLE to revoke any granted roles before dropping the role.

Only the owner or a role (or a role with MANAGE_MEMBERS) can drop a role.

Arguments

role_name

The name of the Role to drop. For case-sensitive names, the name must be wrapped in double quotes, otherwise, the lowercased name will be used.

Examples

<no-db>/<no-store># DROP ROLE test_role;
+------------+------------+------------+------------------------------------------+
|  Type      |  Name      |  Command   |  Summary                                 |
+============+============+============+==========================================+
| role       | test_role  | DROP       | role "test_role" was successfully        |
|            |            |            | dropped                                  |
+------------+------------+------------+------------------------------------------+

Last updated