Back to Starrocks

SHOW ROLES

docs/en/sql-reference/sql-statements/account-management/SHOW_ROLES.md

4.1.0886 B
Original Source

SHOW ROLES

import UserManagementPriv from '../../../_assets/commonMarkdown/userManagementPriv.mdx'

SHOW ROLES displays all roles in the system. You can use SHOW GRANTS FOR ROLE <role_name>; to view the privileges of a specific role. For more information, see SHOW GRANTS.

This command is supported from v3.0.

<UserManagementPriv />

Syntax

SQL
SHOW ROLES

Return fields:

FieldDescription
NameThe name of the role.

Examples

Display all roles in the system.

SQL
mysql> SHOW ROLES;
+---------------+
| Name          |
+---------------+
| root          |
| db_admin      |
| cluster_admin |
| user_admin    |
| public        |
| testrole      |
+---------------+

References