TABLE_PRIVILEGES

Applies to: check marked yes Databricks SQL check marked yes Databricks Runtime 10.2 and above

INFORMATION_SCHEMA.TABLE_PRIVILEGES lists principals which have privileges on the schemas in the catalog.

Definition

The TABLE_PRIVILEGES relation contains the following columns:

Name

Data type

Nullable

Standard

Description

GRANTOR

STRING

No

Yes

Principal that granted the privilege.

GRANTEE

STRING

No

Yes

Principal to which the privilege has been granted.

TABLE_CATALOG

STRING

No

Yes

Catalog of relation on which privilege has been granted.

TABLE_SCHEMA

STRING

No

Yes

Schema of relation on which privilege has been granted.

TABLE_NAME

STRING

No

Yes

Relation on which privilege has been granted.

PRIVILEGE_TYPE

STRING

No

Yes

Privilege being granted.

IS_GRANTABLE

STRING

No

Yes

Always NO. Reserved for future use.

Constraints

The following constraints apply to the TABLE_PRIVILEGES relation:

Class

Name

Column List

Description

Primary key

TABLEPRIVS_PK

GRANTOR, GRANTEE, TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, PRIVILEGE_TYPE

Unique identifier for the privilege granted.

Foreign key

TABLEPRIVS_TABLES_FK

TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME

References TABLES

Examples

> SELECT table_catalog, table_schema, table_name, grantee
    FROM information_schema.table_privileges;