Skip to main content

system.roles

Introduced or updated: v1.2.957

Contains role metadata visible to the current session.

Visibility​

A session with the global GRANT privilege can read all roles in the tenant. Other sessions see only roles available to the current user. Available roles include directly granted roles, inherited roles, and the implicit public role.

The global GRANT exception applies to system.roles. SHOW ROLES still lists the current user's available roles, even for a session with global GRANT.

Fields​

FieldTypeDescription
nameStringRole name.
inherited_rolesUInt64Number of roles granted directly to this role.
inherited_roles_nameStringNames of those roles, sorted and separated by commas.
created_onTimestampRole creation time.
update_onTimestampRole update time.

Example​

SELECT name, inherited_roles, inherited_roles_name
FROM system.roles
ORDER BY name;
Try Databend Cloud for FREE

Multimodal, object-storage-native warehouse for BI, vectors, search, and geo.

Snowflake-compatible SQL with automatic scaling.

Sign up and get $200 in credits.

Try it today