TABLE_CONSTRAINTS View

This Information Schema view displays a row for each referential integrity constraint defined for the tables in the specified (or current) database.

For more information about referential integrity constraints, see Constraints.

See also:

REFERENTIAL_CONSTRAINTS View

Columns

Column Name

Data Type

Description

CONSTRAINT_CATALOG

TEXT

Database that the constraint belongs to

CONSTRAINT_SCHEMA

TEXT

Schema that the constraint belongs to

CONSTRAINT_NAME

TEXT

Name of the constraint

TABLE_CATALOG

TEXT

Name of the database of the current table

TABLE_SCHEMA

TEXT

Name of the schema of the current table

TABLE_NAME

TEXT

Name of the current table

CONSTRAINT_TYPE

TEXT

Type of the constraint

IS_DEFERRABLE

TEXT

Whether evaluation of the constraint can be deferred

INITIALLY_DEFERRED

TEXT

Whether evaluation of the constraint is deferrable and initially deferred

ENFORCED

TEXT

Whether the constraint is enforced

COMMENT

TEXT

Comment for this constraint

CREATED

TIMESTAMP_LTZ

Creation time of the constraint

LAST_ALTERED

TIMESTAMP_LTZ

Last altered time of the constraint

Usage Notes

  • The view only displays objects for which the current role for the session has been granted access privileges.