# DROP ROLE

## Syntax

```sql
DROP ROLE role_name;
```

## Description <a href="#description" id="description"></a>

Drops a [custom role](/overview/core-concepts/access-control.md#custom-roles) within the [organization](/overview/core-concepts/access-control.md#_organiation).

{% hint style="info" %}
**Note** You cannot drop [built-in roles](/overview/core-concepts/access-control.md#built-in-roles).
{% endhint %}

There are guidelines for dropping custom roles:

* Only the owner of a role, or a role with [MANAGE\_MEMBERS](/overview/core-concepts/access-control.md#available-privileges), can drop a role.
* You cannot drop any role that is the owner of an object. If you do wish drop such a role, you must first transfer ownership of the object (or objects) from the role you wish to drop to a role you intend to keep. To transfer ownership of an object, use [GRANT OWNERSHIP](/reference/sql-syntax/command/grant-ownership.md).
* You also cannot drop any role that has been granted any other roles. In this case, you must revoke any such granted roles first. To revoke any granted roles, use [REVOKE ROLE](/reference/sql-syntax/command/revoke-role.md).

### Arguments

#### role\_name

The name of the role to drop. If the name is case-sensitive, you must wrap it in double quotes; otherwise, the system uses the lower case name.

## Examples <a href="#example" id="example"></a>

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.deltastream.io/reference/sql-syntax/ddl/drop-role.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
