The referential_constraints view provides information about referential (foreign key) constraints in the current database.
| Column name | Data type | Description |
|---|---|---|
constraint_catalog |
sql_identifier |
The name of the current database containing the constraint. |
constraint_schema |
sql_identifier |
The name of the schema containing the constraint. |
constraint_name |
sql_identifier |
The name of the constraint. |
unique_constraint_catalog |
sql_identifier |
The name of the database that contains the unique or primary key constraint referenced by the foreign key. |
unique_constraint_schema |
sql_identifier |
The name of the schema that contains the referenced unique or primary key constraint. |
unique_constraint_name |
sql_identifier |
The name of the unique or primary key constraint referenced by the foreign key. |
match_option |
character_data |
The match option of the foreign key constraint. The possible options are:
|
update_rule |
character_data |
The update rule of the foreign key constraint. The possible options are:
|
delete_rule |
character_data |
The delete rule of the foreign key constraint. The possible options are:
|