Purpose
The information_schema.REFERENTIAL_CONSTRAINTS view displays the metadata of FOREIGN KEY constraints.
Note
This view was introduced in OceanBase Database V2.2.77.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| CONSTRAINT_CATALOG | varchar(64) | NO | The name of the catalog to which the constraint belongs. The value of this column is always def. |
| CONSTRAINT_SCHEMA | varchar(128) | NO | The name of the database to which the constraint belongs. |
| CONSTRAINT_NAME | varchar(128) | NO | The name of the constraint. |
| UNIQUE_CONSTRAINT_CATALOG | varchar(64) | NO | The name of the catalog containing the unique constraint or primary key that the constraint references. The value of this column is always def. |
| UNIQUE_CONSTRAINT_SCHEMA | varchar(128) | NO | The name of the database containing the unique constraint or primary key that the constraint references. |
| UNIQUE_CONSTRAINT_NAME | varchar(128) | NO | The name of the unique constraint or primary key that the constraint references. |
| MATCH_OPTION | varchar(64) | NO | The value of the MATCH attribute of the constraint. The only valid value is NONE. |
| UPDATE_RULE | varchar(64) | NO | The value of the ON UPDATE attribute of the constraint. Valid values are CASCADE, SET NULL, RESTRICT, and NO ACTION. |
| DELETE_RULE | varchar(64) | NO | The value of the ON DELETE attribute of the constraint. Valid values are CASCADE, SET NULL, RESTRICT, and NO ACTION. |
| TABLE_NAME | varchar(256) | NO | The name of the child table containing the constraint. |
| REFERENCED_TABLE_NAME | varchar(256) | NO | The name of the parent table referenced by the constraint. |