> ## 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.

# SHOW ROLES

The `SHOW ROLES` [statement](https://docs.cockroachlabs.com/docs/v24.2/sql-statements) lists the roles for all databases.

> [!NOTE]
>
> Since the keywords `ROLES` and `USERS` can now be used interchangeably in SQL statements for enhanced PostgreSQL compatibility, `SHOW ROLES` is now an alias for [`SHOW USERS`](https://docs.cockroachlabs.com/docs/v24.2/show-users).

## Synopsis

![show\_roles syntax diagram](https://mintcdn.com/cockroachlabs/O8LdfYQ-dz7oGPVh/images/sql-diagrams/v24.2/show_roles.svg?fit=max\&auto=format\&n=O8LdfYQ-dz7oGPVh\&q=85\&s=abcd0809be06acdbd30909c9b8d1dd07)

## Required privileges

The role must have the [`SELECT`](https://docs.cockroachlabs.com/docs/v24.2/select-clause) [privilege](https://docs.cockroachlabs.com/docs/v24.2/security-reference/authorization#managing-privileges) on the `system.users` and `system.role_members` tables.

## Example

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
> SHOW ROLES;
```

```
  username |  options   | member_of
-----------+------------+------------
  admin    | CREATEROLE | {}
  carl     | NOLOGIN    | {}
  petee    |            | {}
  root     | CREATEROLE | {admin}
(4 rows)
```

## See also

* [Authorization](https://docs.cockroachlabs.com/docs/v24.2/authorization)
* [`CREATE ROLE`](https://docs.cockroachlabs.com/docs/v24.2/create-role)
* [`DROP ROLE`](https://docs.cockroachlabs.com/docs/v24.2/drop-role)
* [`GRANT`](https://docs.cockroachlabs.com/docs/v24.2/grant)
* [`REVOKE`](https://docs.cockroachlabs.com/docs/v24.2/revoke)
* [Manage Users](https://docs.cockroachlabs.com/docs/v24.2/security-reference/authorization#create-and-manage-users)
