SHOW ROLES
Descriptionβ
The SHOW ROLES
statement is used to display all created role information, including role name, included users and permissions.
Syntaxβ
SHOW ROLES
Return Valueβ
Column | DataType | Note |
---|---|---|
Name | string | Role Name |
Comment | string | Comment |
Users | string | Included Users |
GlobalPrivs | string | Global Privileges |
CatalogPrivs | string | Catalog Privileges |
DatabasePrivs | string | Database Privileges |
TablePrivs | string | Table Privileges |
ResourcePrivs | string | Resource Privileges |
WorkloadGroupPrivs | string | Workload Group Privileges |
Access Control Requirementsβ
The user executing this SQL command must have at least the following privileges:
Privilege | Object | Notes |
---|---|---|
GRANT_PRIV | USER or ROLE | This operation can only be performed by users or roles with GRANT_PRIV permissions |
Exampleβ
- View created roles
SHOW ROLES