Purpose
The information_schema.KEY_COLUMN_USAGE view displays information about constraints on columns.
Note
This view is introduced since OceanBase Database V1.4.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| CONSTRAINT_CATALOG | varchar(3) | 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(7) | NO | The name of the constraint. The value of this column is PRIMARY, the column name, or the foreign key name. |
| TABLE_CATALOG | varchar(3) | NO | The name of the catalog to which the table belongs. |
| TABLE_SCHEMA | varchar(128) | NO | The name of the database to which the table belongs. |
| TABLE_NAME | varchar(256) | NO | The name of the table. |
| COLUMN_NAME | varchar(128) | NO | The name of the column. |
| ORDINAL_POSITION | bigint(20) | NO | The serial number of the column within the table. |
| POSITION_IN_UNIQUE_CONSTRAINT | null | NO | The value of this column is NULL for unique and primary-key constraints. For foreign-key constraints, the value of this column is the ordinal position in the key of the table that is being referenced. |
| REFERENCED_TABLE_SCHEMA | varchar(128) | NO | The name of the database referenced by the constraint. |
| REFERENCED_TABLE_NAME | varchar(256) | NO | The name of the table referenced by the constraint. |
| REFERENCED_COLUMN_NAME | varchar(128) | NO | The name of the column referenced by the constraint. |