DROP ROLE statement removes one or more SQL roles. You can use the keywords ROLE and USER interchangeably. DROP USER is an alias for DROP ROLE.
The
DROP ROLE statement performs a schema change. For more information about how online schema changes work in CockroachDB, see Online Schema Changes.Considerations
- The
adminrole cannot be dropped, androotmust always be a member ofadmin. - A role cannot be dropped if it has privileges. Use
REVOKEto remove privileges. - Roles that own objects (such as databases, tables, schemas, and types) cannot be dropped until the ownership is transferred to another role.
Required privileges
Non-admin roles cannot drop admin roles. To drop non-admin roles, the role must be a member of theadmin role or have the CREATEROLE parameter set.

