CHECK_CONSTRAINTS
Applies to: Databricks SQL
Databricks Runtime
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:
Name | Data type | Nullable | Standard | Description |
---|---|---|---|---|
CONSTRAINT_CATALOG |
STRING |
No | Yes | Catalog containing the check constraint. |
CONSTRAINT_SCHEMA |
STRING |
No | Yes | Schema containing the check constraint. |
CONSTRAINT_NAME |
STRING |
No | Yes | Name of the check constraint. |
CHECK_CLAUSE |
STRING |
No | Yes | The text of the check constraint condition. |
SQL_PATH |
STRING |
No | Yes | Always NULL , reserved for future use. |
Constraints
The following constraints apply to the CHECK_CONSTRAINT
relation:
Class | Name | Column List | Description | ||
---|---|---|---|---|---|
Primary key | CHK_CONS_PK |
CONSTRAINT_CATALOG , CONSTRAINT_SCHEMA , CONSTRAINT_NAME |
Unique identifier for the constraint. | ||
Foreign key | CHK_CONS_TAB_CONS_FK |
CONSTRAINT_CATALOG |
CONSTRAINT_SCHEMA |
CONSTRAINT_NAME |
References TABLE_CONSTRAINTS. |
Examples
> SELECT constraint_name, check_clause
FROM information_schema.check_constraints
WHERE table_schema = 'information_schema';