Skip to main content
Version: Latest-3.3

referential_constraints

note

This view does not apply to the available features in StarRocks.

referential_constraints contains all referential (foreign key) constraints.

The following fields are provided in referential_constraints:

FieldDescription
CONSTRAINT_CATALOGThe name of the catalog to which the constraint belongs. This value is always def.
CONSTRAINT_SCHEMAThe name of the database to which the constraint belongs.
CONSTRAINT_NAMEThe name of the constraint.
UNIQUE_CONSTRAINT_CATALOGThe name of the catalog containing the unique constraint that the constraint references. This value is always def.
UNIQUE_CONSTRAINT_SCHEMAThe name of the schema containing the unique constraint that the constraint references.
UNIQUE_CONSTRAINT_NAMEThe name of the unique constraint that the constraint references.
MATCH_OPTIONThe value of the constraint MATCH attribute. The only valid value at this time is NONE.
UPDATE_RULEThe value of the constraint ON UPDATE attribute. Valid values: CASCADE, SET NULL, SET DEFAULT, RESTRICT, and NO ACTION.
DELETE_RULEThe value of the constraint ON DELETE attribute. Valid values: CASCADE, SET NULL, SET DEFAULT, RESTRICT, and NO ACTION.
TABLE_NAMEThe name of the table. This value is the same as in the TABLE_CONSTRAINTS table.
REFERENCED_TABLE_NAMEThe name of the table referenced by the constraint.