information_schema
.table_constraints
.*
relation | column | mysql | mariadb | tidb | postgres | cockroachdb | mssql | |
---|---|---|---|---|---|---|---|---|
table_constraints |
||||||||
constraint_catalog |
VARCHAR NOT NULL :
5.7-8
| VARCHAR NOT NULL :
NULL :
| VARCHAR(512) NULL :
| SQL_IDENTIFIER :
SQL_IDENTIFIER NULL :
| NVARCHAR(128) NULL :
| |||
constraint_name |
VARCHAR NOT NULL :
5.7
VARCHAR NULL :
8
| VARCHAR NOT NULL :
NULL :
| VARCHAR(64) NULL :
| SQL_IDENTIFIER :
SQL_IDENTIFIER NULL :
| SYSNAME NULL :
| |||
constraint_schema |
VARCHAR NOT NULL :
5.7-8
| VARCHAR NOT NULL :
NULL :
| VARCHAR(64) NULL :
| SQL_IDENTIFIER :
SQL_IDENTIFIER NULL :
| NVARCHAR(128) NULL :
| |||
constraint_type |
VARCHAR NOT NULL :
5.7-8
| VARCHAR NOT NULL :
NULL :
| VARCHAR(64) NULL :
| CHARACTER_DATA :
CHARACTER_DATA NULL :
| VARCHAR(11) NULL :
| |||
enforced |
VARCHAR NOT NULL :
8
| unsupported | unsupported | YES_OR_NO NULL :
| unsupported | unsupported | ||
initially_deferred |
unsupported | unsupported | unsupported | CHARACTER_DATA :
YES_OR_NO NULL :
| VARCHAR(2) NULL :
| |||
is_deferrable |
unsupported | unsupported | unsupported | CHARACTER_DATA :
YES_OR_NO NULL :
| VARCHAR(2) NULL :
| |||
nulls_distinct |
unsupported | unsupported | unsupported | YES_OR_NO NULL :
| unsupported | unsupported | ||
table_catalog |
unsupported | unsupported | unsupported | SQL_IDENTIFIER :
SQL_IDENTIFIER NULL :
| NVARCHAR(128) NULL :
| |||
table_name |
VARCHAR NOT NULL :
5.7-8
| VARCHAR NOT NULL :
NULL :
| VARCHAR(64) NULL :
| SQL_IDENTIFIER :
SQL_IDENTIFIER NULL :
| SYSNAME NULL :
| |||
table_schema |
VARCHAR NOT NULL :
5.7-8
| VARCHAR NOT NULL :
NULL :
| VARCHAR(64) NULL :
| SQL_IDENTIFIER :
SQL_IDENTIFIER NULL :
| NVARCHAR(128) NULL :
|