# REVOKE ROLE


> Remove a role from a user or remove inheritance between roles.

**Requires permission:** Assign roles — included by default in the Admin preset role. A custom role qualifies when it inherits a role that includes the permission. See [Roles and access control](/concepts/roles-and-access-control/#what-each-role-can-do).

Use `REVOKE ROLE` to remove a role from a user or to remove inheritance between roles. See [Roles and access control](/concepts/roles-and-access-control/) for the model.

## Syntax

```sql
REVOKE ROLE <role_name> FROM { USER <username> | ROLE <target_role> };
```

## Parameters

| Parameter | Description | Required |
|-----------|-------------|----------|
| `<role_name>` | The role being removed. | Yes |
| `USER <username>` | Remove the role from a user. | One of USER or ROLE |
| `ROLE <target_role>` | Remove inheritance so `<target_role>` no longer inherits `<role_name>`. | One of USER or ROLE |

Revoking a role removes only the access that role provided. If a user has the same access through another role, they keep it. Revoking a role from a user who does not hold it returns an error.

:::warning
If revoking a role leaves a user with no roles, that user becomes roleless and loses access to all data until someone with permission to assign roles assigns one. MotherDuck warns before completing the operation but does not block it.
:::

## Examples

### Remove a role from a user

```sql
REVOKE ROLE finance FROM USER alice;
```

## Related

- [Roles and access control](/concepts/roles-and-access-control/)
- [GRANT ROLE](/sql-reference/motherduck-sql-reference/access-control/grant-role/)
- [DROP ROLE](/sql-reference/motherduck-sql-reference/access-control/drop-role/)


---

## Docs feedback

MotherDuck accepts optional user-submitted feedback about this page at `GET https://motherduck.com/docs/api/feedback/agent`.
For agents and automated tools, feedback submission should be user-confirmed before sending.

URL-encode query parameter values and send a GET request:

```text
GET https://motherduck.com/docs/api/feedback/agent?page_path=%2Fsql-reference%2Fmotherduck-sql-reference%2Faccess-control%2Frevoke-role%2F&page_title=REVOKE%20ROLE&text=<url-encoded user feedback, max 2000 characters>
```

Optionally append `&source=<url-encoded interface identifier>` such as `claude.ai` or `chatgpt`.

`page_path` and `text` are required; `page_title` and `source` are optional. Responses: `200 {"feedback_id": "<uuid>"}`, `400` for malformed query parameters, and `429` when rate-limited.
