- Schema:
REFERENTIAL_CONSTRAINTS view¶
This Account Usage view displays a row for each referential integrity constraint defined in the account.
For more information about referential integrity constraints, see Constraints.
- See also:
Columns¶
Column Name |
Data Type |
Description |
---|---|---|
CONSTRAINT_CATALOG_ID |
NUMBER |
Internal/system-generated identifier for the database of the constraint. |
CONSTRAINT_CATALOG |
TEXT |
Database that the constraint belongs to |
CONSTRAINT_SCHEMA_ID |
NUMBER |
Internal/system-generated identifier for the schema of the constraint. |
CONSTRAINT_SCHEMA |
TEXT |
Schema that the constraint belongs to |
CONSTRAINT_NAME |
TEXT |
Name of the constraint |
UNIQUE_CONSTRAINT_CATALOG_ID |
NUMBER |
Internal/system-generated identifier for the database of the current constraint. |
UNIQUE_CONSTRAINT_CATALOG |
TEXT |
Database of the unique constraint referenced by the current constraint. |
UNIQUE_CONSTRAINT_SCHEMA_ID |
NUMBER |
Internal/system-generated identifier for the schema of the constraint. |
UNIQUE_CONSTRAINT_SCHEMA |
TEXT |
Schema of the unique constraint referenced by the current constraint. |
UNIQUE_CONSTRAINT_NAME |
TEXT |
Name of the unique constraint referenced by the current constraint. |
MATCH_OPTION |
TEXT |
Match option for the constraint. |
UPDATE_RULE |
TEXT |
Update Rule for the current constraint. |
DELETE_RULE |
TEXT |
Delete Rule for the current constraint. |
COMMENT |
TEXT |
Comment for the constraint. |
CREATED |
TIMESTAMP_LTZ |
Date and time when the constraint was created. |
LAST_ALTERED |
TIMESTAMP_LTZ |
Date and time the object was last altered. See Usage Notes. |
DELETED |
TIMESTAMP_LTZ |
Date and time when the constraint was dropped. |
Usage notes¶
Latency for the view may be up to 120 minutes (2 hours).
The view only displays objects for which the current role for the session has been granted access privileges.
The LAST_ALTERED column is updated when the following operations are performed on an object:
DDL operations.
DML operations (for tables only). This column is updated even when no rows are affected by the DML statement.
Background maintenance operations on metadata performed by Snowflake.