--- title: "SHOW PRIVILEGES" description: "SHOW PRIVILEGES lists the privileges granted on all objects via role-based access control (RBAC)." menu: main: parent: 'commands' --- `SHOW PRIVILEGES` lists the privileges granted on all objects via [role-based access control](/manage/access-control/#role-based-access-control-rbac) (RBAC). ## Syntax ```mzsql SHOW PRIVILEGES [ ON ] [ FOR ] ``` Option | Description -----------------------------|-------------------------------------------------- **ON** | If specified, only show privileges for the specified object type. Accepted object types:
  • CLUSTERS
  • CONNECTION
  • DATABASES
  • SCHEMAS
  • SECRETS
  • SYSTEM
  • TABLES
  • TYPES
**FOR** | If specified, only show privileges for the specified role. [//]: # "TODO(morsapaes) Improve examples." ## Examples ```mzsql SHOW PRIVILEGES; ``` ```nofmt grantor | grantee | database | schema | name | object_type | privilege_type -----------+-------------+-------------+--------+-------------+-------------+---------------- mz_system | PUBLIC | materialize | | public | schema | USAGE mz_system | PUBLIC | | | quickstart | cluster | USAGE mz_system | PUBLIC | | | materialize | database | USAGE mz_system | materialize | materialize | | public | schema | CREATE mz_system | materialize | materialize | | public | schema | USAGE mz_system | materialize | | | quickstart | cluster | CREATE mz_system | materialize | | | quickstart | cluster | USAGE mz_system | materialize | | | materialize | database | CREATE mz_system | materialize | | | materialize | database | USAGE mz_system | materialize | | | | system | CREATECLUSTER mz_system | materialize | | | | system | CREATEDB mz_system | materialize | | | | system | CREATEROLE ``` ```mzsql SHOW PRIVILEGES ON SCHEMAS; ``` ```nofmt grantor | grantee | database | schema | name | object_type | privilege_type -----------+-------------+-------------+--------+--------+-------------+---------------- mz_system | PUBLIC | materialize | | public | schema | USAGE mz_system | materialize | materialize | | public | schema | CREATE mz_system | materialize | materialize | | public | schema | USAGE ``` ```mzsql SHOW PRIVILEGES FOR materialize; ``` ```nofmt grantor | grantee | database | schema | name | object_type | privilege_type -----------+-------------+-------------+--------+-------------+-------------+---------------- mz_system | materialize | materialize | | public | schema | CREATE mz_system | materialize | materialize | | public | schema | USAGE mz_system | materialize | | | quickstart | cluster | CREATE mz_system | materialize | | | quickstart | cluster | USAGE mz_system | materialize | | | materialize | database | CREATE mz_system | materialize | | | materialize | database | USAGE mz_system | materialize | | | | system | CREATECLUSTER mz_system | materialize | | | | system | CREATEDB mz_system | materialize | | | | system | CREATEROLE ``` ## Related pages - [`GRANT PRIVILEGE`](../grant-privilege) - [`REVOKE PRIVILEGE`](../revoke-privilege) - [Access control](/manage/access-control/#role-based-access-control-rbac)