Overview
Records the constraint information related to tables and columns during the CREATE TABLE operation.
Columns
Field Name |
Type |
Whether can be NULL |
Description |
|---|---|---|---|
| CONSTRAINT_CATALOG | varchar(64) | NO | The name of the directory to which the constraint belongs. This value is always def |
| CONSTRAINT_SCHEMA | varchar(128) | NO | The constraint belongs to the SCHEMA Name |
| CONSTRAINT_NAME | varchar(64) | NO | Constraint name |
| CHECK_CLAUSE | text | NO | Specify the constraint expression. |
Sample query
View the constraint information on tables and columns for the current tenant.
obclient [infotest]> SELECT * FROM information_schema.CHECK_CONSTRAINTS;
The query result is as follows:
+--------------------+-------------------+-------------------------------+--------------+
| CONSTRAINT_CATALOG | CONSTRAINT_SCHEMA | CONSTRAINT_NAME | CHECK_CLAUSE |
+--------------------+-------------------+-------------------------------+--------------+
| def | infotest | tbl8_OBCHECK_1736909793670468 | (`col1` > 0) |
+--------------------+-------------------+-------------------------------+--------------+
1 row in set