> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cockroachlabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DROP ROLE

The `DROP ROLE` [statement](/docs/stable/sql-statements.md) removes one or more SQL roles. You can use the keywords `ROLE` and `USER` interchangeably. [`DROP USER`](/docs/stable/drop-user) is an alias for `DROP ROLE`.

> [!NOTE]
>
> The `DROP ROLE` statement performs a schema change. For more information about how online schema changes work in CockroachDB, see [Online Schema Changes](/docs/stable/online-schema-changes.md).

## Considerations

* The `admin` user/role cannot be dropped, and `root` must always be a member of `admin`.
* A user/role cannot be dropped if it has privileges. Use [`REVOKE`](/docs/stable/revoke) to remove privileges.
* Users/roles that [own objects](/docs/stable/security-reference/authorization.md#object-ownership) (such as databases, tables, schemas, and types) cannot be dropped until the [ownership is transferred to another user/role](/docs/stable/alter-database.md).
* If a user/role is logged in while a [different session](/docs/stable/show-sessions.md) drops that user, CockroachDB checks that the user exists before allowing it to inherit privileges from [the `public` role](/docs/stable/security-reference/authorization). In addition, any active [web](/docs/stable/ui-overview.md#authentication) [sessions](/docs/stable/cockroach-auth-session.md) are revoked when a user is dropped.
* To bulk-drop [auto-provisioned](/docs/stable/ldap-authentication.md#option-1-automatic-user-provisioning-recommended) users (for example, dormant users provisioned through LDAP, OIDC, or JWT authentication), use [`DROP PROVISIONED ROLES`](/docs/stable/drop-provisioned-roles) instead.

## Required privileges

Non-admin roles cannot drop admin roles. To drop non-admin roles, the role must be a member of the `admin` role or have the [`CREATEROLE`](/docs/stable/create-role#create-a-role-that-can-create-other-roles-and-manage-authentication-methods-for-the-new-roles) parameter set.

## Synopsis

![drop\_role syntax diagram](https://mintcdn.com/cockroachlabs/UZNSFbmU2EwEm6G5/images/sql-diagrams/common/drop_role.svg?fit=max\&auto=format\&n=UZNSFbmU2EwEm6G5\&q=85\&s=148776e9eceff54cb9395e437d9c8b7c)

## Parameters

| Parameter | Description |
| - | - |
| `name` | The name of the role to remove. To remove multiple roles, use a comma-separate list of roles. You can use [`SHOW ROLES`](/docs/stable/show-roles) to find the names of roles. |

## Example

In this example, first check a role's privileges. Then, revoke the role's privileges and remove the role.

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
> SHOW GRANTS ON documents FOR dev_ops;
```

```
+------------+--------+-----------+---------+------------+
|  Database  | Schema |   Table   |  User   | Privileges |
+------------+--------+-----------+---------+------------+
| jsonb_test | public | documents | dev_ops | INSERT     |
+------------+--------+-----------+---------+------------+
```

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
> REVOKE INSERT ON documents FROM dev_ops;
```

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
> DROP ROLE dev_ops;
```

## See also

* [Authorization](/docs/stable/authorization.md)
* [Authorization Best Practices](/docs/stable/security-reference/authorization.md#authorization-best-practices)
* [`CREATE ROLE`](/docs/stable/create-role)
* [`DROP PROVISIONED ROLES`](/docs/stable/drop-provisioned-roles)
* [`SHOW ROLES`](/docs/stable/show-roles)
* [`GRANT`](/docs/stable/grant)
* [`SHOW GRANTS`](/docs/stable/show-grants)
* [SQL Statements](/docs/stable/sql-statements.md)
* [Online Schema Changes](/docs/stable/online-schema-changes.md)
