Skip to main content
VeloDB Cloud 26.x is based on Apache Doris 4.x. See Version Mapping.

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​

ColumnDataTypeNote
NamestringRole Name
CommentstringComment
UsersstringIncluded Users
GlobalPrivsstringGlobal Privileges
CatalogPrivsstringCatalog Privileges
DatabasePrivsstringDatabase Privileges
TablePrivsstringTable Privileges
ResourcePrivsstringResource Privileges
WorkloadGroupPrivsstringWorkload Group Privileges

Access control requirements​

The user executing this SQL command must have at least the following privileges:

PrivilegeObjectNotes
GRANT_PRIVUSER or ROLEThis operation can only be performed by users or roles with GRANT_PRIV permissions

Usage notes​

The engine creates a default SQL role for each user. If you want to display the default role, you can execute the command set show_user_default_role=true;.

Example​

  • View created roles
SHOW ROLES