📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

SHOW ROLES



Lists all the roles assigned to the current user.

Syntax

SHOW ROLES

Output

The command returns the results in a table with these columns:

ColumnDescription
nameThe role name.
inherited_rolesNumber of roles inherited by the current role.
is_currentIndicates whether the role is currently active.
is_defaultIndicates whether the role is the default role of the user.

Examples

SHOW ROLES; ┌───────────────────────────────────────────────────────┐ │ name │ inherited_roles │ is_current │ is_default │ ├───────────┼─────────────────┼────────────┼────────────┤ │ developer │ 0falsefalse │ │ public │ 0falsefalse │ │ writer │ 0truetrue │ └───────────────────────────────────────────────────────┘

Was this page helpful?