Skip to main content
SHOW GRANTS displays all the privileges that have been granted to a user or role. For more information about roles and privileges, see Overview of privileges. AI grants use the same output: USAGE ON AI FUNCTION, USAGE ON ALL AI FUNCTIONS, USAGE ON AI PROVIDER, and USAGE ON ALL AI PROVIDERS. Provider names are quoted, and grants on a deleted provider are omitted. Provider grants refer to UUIDs, so recreating a provider with the same name does not restore its old grants. Tip All roles and users can view the privileges granted to them or the roles assigned to them. Only users with the user_admin role can view the privileges of a specified user or role.

Syntax

Parameters

  • CURRENT_USER[()]: Returns the privileges of the current session user. The parentheses are optional. This form is equivalent to SHOW GRANTS and is provided for compatibility with MySQL clients (such as Metabase and DBeaver) that issue this statement automatically during connection initialization.
  • role_name
  • user_identity
Return fields:

Examples

References

GRANT