Skip to main content

CHECK_CONSTRAINTS

Applies to: check marked yes Databricks SQL check marked yes Databricks Runtime check marked yes Unity Catalog only

Reserved for future use.

INFORMATION_SCHEMA.CHECK_CONSTRAINTS will describe check constraints defined on tables.

Definition

The CHECK_CONSTRAINTS relation contains the following columns:

NameData typeNullableStandardDescription
CONSTRAINT_CATALOGSTRINGNoYesCatalog containing the check constraint.
CONSTRAINT_SCHEMASTRINGNoYesSchema containing the check constraint.
CONSTRAINT_NAMESTRINGNoYesName of the check constraint.
CHECK_CLAUSESTRINGNoYesThe text of the check constraint condition.
SQL_PATHSTRINGNoYesAlways NULL, reserved for future use.

Constraints

The following constraints apply to the CHECK_CONSTRAINT relation:

ClassNameColumn ListDescription
Primary keyCHK_CONS_PKCONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, CONSTRAINT_NAMEUnique identifier for the constraint.
Foreign keyCHK_CONS_TAB_CONS_FKCONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, CONSTRAINT_NAMEReferences TABLE_CONSTRAINTS.

Examples

SQL
> SELECT constraint_name, check_clause
FROM information_schema.check_constraints
WHERE table_schema = 'information_schema';