# Information Schema ENABLED\_ROLES Table

The [Information Schema](/docs/server/reference/system-tables/information-schema.md) `ENABLED_ROLES` table shows the enabled [roles](/docs/server/security/user-account-management/roles.md) for the current session.

It contains the following column:

| Column     | Description                     |
| ---------- | ------------------------------- |
| ROLE\_NAME | The enabled role name, or NULL. |

This table lists all roles that are currently enabled, one role per row — the current role, roles granted to the current role, roles granted to these roles and so on. If no role is set, the row contains a `NULL` value.

The roles that the current user can enable are listed in the [APPLICABLE\_ROLES](/docs/server/reference/system-tables/information-schema/information-schema-tables/information-schema-applicable_roles-table.md) Information Schema table.

See also [CURRENT\_ROLE()](/docs/server/reference/sql-functions/secondary-functions/information-functions/current_role.md).

## Examples

```sql
SELECT * FROM information_schema.ENABLED_ROLES;
+-----------+
| ROLE_NAME |
+-----------+
| NULL      |
+-----------+

SET ROLE staff;

SELECT * FROM information_schema.ENABLED_ROLES;
+-----------+
| ROLE_NAME |
+-----------+
| staff     |
+-----------+
```

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}


---

# 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://mariadb.com/docs/server/reference/system-tables/information-schema/information-schema-tables/information-schema-enabled_roles-table.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.
