TABLE_CONSTRAINTS
Preview
This feature is in Public Preview.
Applies to: Databricks SQL Databricks Runtime 11.3 LTS and above Unity Catalog only
INFORMATION_SCHEMA.TABLE_CONSTRAINTS contains metadata for all primary and foreign key constraints within the catalog.
The rows returned are limited to the tables the user has permission to interact with.
Definition
The TABLE_CONSTRAINTS
relation contains the following columns:
Name |
Data type |
Nullable |
Standard |
Description |
---|---|---|---|---|
|
|
No |
Yes |
Catalog containing the constraint. |
|
|
No |
Yes |
Schema containing the constraint. |
|
|
No |
Yes |
Name of the constraint. |
|
|
No |
Yes |
Catalog containing the table. |
|
|
No |
Yes |
Schema containing the table. |
|
|
No |
Yes |
Name of the table in which the constraint is defined. |
|
|
No |
Yes |
One of |
|
|
No |
Yes |
Always`’YES’`. Reserved for future use. |
|
|
No |
Yes |
Always |
|
|
No |
Yes |
|
|
|
Yes |
No |
Optional description of the constraint. |
Constraints
The following constraints apply to the TABLE_CONSTRAINTS
relation:
Class |
Name |
Column List |
Description |
---|---|---|---|
Primary key |
|
|
Uniquely identifies the relation. |
Foreign key |
|
|
References |