Rechercher dans le manuel MySQL
25.32 The INFORMATION_SCHEMA TABLE_CONSTRAINTS Table
The TABLE_CONSTRAINTS table describes
which tables have constraints.
The TABLE_CONSTRAINTS table has these
columns:
CONSTRAINT_CATALOGThe name of the catalog to which the constraint belongs. This value is always
def.CONSTRAINT_SCHEMAThe name of the schema (database) to which the constraint belongs.
TABLE_SCHEMAThe name of the schema (database) to which the table belongs.
TABLE_NAMEThe name of the table.
The
CONSTRAINT_TYPEThe type of constraint. The value can be
UNIQUE,PRIMARY KEY,FOREIGN KEY, or (as of MySQL 8.0.16)CHECK. This is aCHAR(notENUM) column.The
UNIQUEandPRIMARY KEYinformation is about the same as what you get from theKey_namecolumn in the output fromSHOW INDEXwhen theNon_uniquecolumn is0.ENFORCEDFor
CHECKconstraints, the value isYESorNOto indicate whether the constraint is enforced. For other constraints, the value is alwaysYES.This column was added in MySQL 8.0.16.
Document created the 26/06/2006, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/mysql-rf-table-constraints-table.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author of this site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.