Documentation Home
MySQL 5.5 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 26.8Mb
PDF (A4) - 26.8Mb
PDF (RPM) - 25.2Mb
HTML Download (TGZ) - 6.3Mb
HTML Download (Zip) - 6.3Mb
HTML Download (RPM) - 5.3Mb
Man Pages (TGZ) - 157.6Kb
Man Pages (Zip) - 260.8Kb
Info (Gzip) - 2.6Mb
Info (Zip) - 2.6Mb
Excerpts from this Manual

MySQL 5.5 Reference Manual  /  INFORMATION_SCHEMA Tables  /  The INFORMATION_SCHEMA TABLE_CONSTRAINTS Table

21.23 The INFORMATION_SCHEMA TABLE_CONSTRAINTS Table

The TABLE_CONSTRAINTS table describes which tables have constraints.

TABLE_CONSTRAINTS has these columns:

  • CONSTRAINT_CATALOG

    The value of this column is always def.

  • CONSTRAINT_SCHEMA

    The name of the schema to which the constraint belongs.

  • TABLE_SCHEMA

    The name of the schema to which the table belongs.

  • TABLE_NAME

    The name of the table.

  • The CONSTRAINT_TYPE

    The type of constraint. The value can be UNIQUE, PRIMARY KEY, FOREIGN KEY, or CHECK. This is a CHAR (not ENUM) column. The CHECK value is not available until MySQL supports CHECK.

    The UNIQUE and PRIMARY KEY information is about the same as what you get from the Key_name field in the output from SHOW INDEX when the Non_unique field is 0.


User Comments
Sign Up Login You must be logged in to post a comment.