VIEWS

Applies to: check marked yes Databricks SQL check marked yes Databricks Runtime 10.4 LTS and above check marked yes Unity Catalog only

INFORMATION_SCHEMA.VIEWS describes view specific information about views in the catalog.

The rows returned are limited to the views the user is privileged to interact with.

Definition

The VIEWS relation contains the following columns:

Name Data type Nullable Standard Description
TABLE_CATALOG STRING No Yes Catalog containing the view.
TABLE_SCHEMA STRING No Yes Schema containing the view.
TABLE_NAME STRING No Yes Name of the relation.
VIEW_DEFINITION STRING Yes Yes The view text if the user owns the view, NULL otherwise.
CHECK_OPTION STRING No Yes Always 'NONE'. Reserved for future use.
IS_UPDATABLE STRING No Yes Always NO. Reserved for future use
IS_INSERTABLE_INTO STRING No Yes Always NO. Reserved for future use.
SQL_PATH STRING Yes Yes Always NULL. Reserved for future use.

Constraints

The following constraints apply to the VIEWS relation:

Class Name Column List Description
Primary key VIEWS_PK TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME Unique identifier for the view.
Foreign key VIEWS_TABLES_FK TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME References TABLES.

Examples

> SELECT is_intertable_into
    FROM information_schema.views
    WHERE table_schema = 'information_schema'
      AND table_name = 'columns'
  NO