Skip to main content

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:

NameData typeNullableStandardDescription
TABLE_CATALOGSTRINGNoYesCatalog containing the view.
TABLE_SCHEMASTRINGNoYesSchema containing the view.
TABLE_NAMESTRINGNoYesName of the relation.
VIEW_DEFINITIONSTRINGYesYesThe view text if the user owns the view, NULL otherwise.
CHECK_OPTIONSTRINGNoYesAlways 'NONE'. Reserved for future use.
IS_UPDATABLESTRINGNoYesAlways NO. Reserved for future use
IS_INSERTABLE_INTOSTRINGNoYesAlways NO. Reserved for future use.
SQL_PATHSTRINGYesYesAlways NULL. Reserved for future use.

Constraints

The following constraints apply to the VIEWS relation:

ClassNameColumn ListDescription
Primary keyVIEWS_PKTABLE_CATALOG, TABLE_SCHEMA, TABLE_NAMEUnique identifier for the view.
Foreign keyVIEWS_TABLES_FKTABLE_CATALOG, TABLE_SCHEMA, TABLE_NAMEReferences TABLES.

Examples

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