> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/server/reference/system-tables/information-schema/information-schema-tables/information-schema-enabled_roles-table.md).

# 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" %}
