<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="information-schema-table-constraints-table">
      </a>
      28.3.41 The INFORMATION_SCHEMA TABLE_CONSTRAINTS Table
     </h3>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045078265552">
  </a>
  <p>
   The
   <a class="link" href="information-schema-table-constraints-table.html" title="28.3.41 The INFORMATION_SCHEMA TABLE_CONSTRAINTS Table">
    <code class="literal">
     TABLE_CONSTRAINTS
    </code>
   </a>
   table describes
      which tables have constraints.
  </p>
  <p>
   The
   <a class="link" href="information-schema-table-constraints-table.html" title="28.3.41 The INFORMATION_SCHEMA TABLE_CONSTRAINTS Table">
    <code class="literal">
     TABLE_CONSTRAINTS
    </code>
   </a>
   table has these
      columns:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="literal">
       CONSTRAINT_CATALOG
      </code>
     </p>
     <p>
      The name of the catalog to which the constraint belongs. This
          value is always
      <code class="literal">
       def
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       CONSTRAINT_SCHEMA
      </code>
     </p>
     <p>
      The name of the schema (database) to which the constraint
          belongs.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       CONSTRAINT_NAME
      </code>
     </p>
     <p>
      The name of the constraint.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       TABLE_SCHEMA
      </code>
     </p>
     <p>
      The name of the schema (database) to which the table belongs.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       TABLE_NAME
      </code>
     </p>
     <p>
      The name of the table.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       CONSTRAINT_TYPE
      </code>
     </p>
     <p>
      The type of constraint. The value can be
      <code class="literal">
       UNIQUE
      </code>
      ,
      <code class="literal">
       PRIMARY KEY
      </code>
      ,
      <code class="literal">
       FOREIGN KEY
      </code>
      or
      <code class="literal">
       CHECK
      </code>
      .
          This is a
      <a class="link" href="char.html" title="13.3.2 The CHAR and VARCHAR Types">
       <code class="literal">
        CHAR
       </code>
      </a>
      (not
      <a class="link" href="enum.html" title="13.3.5 The ENUM Type">
       <code class="literal">
        ENUM
       </code>
      </a>
      ) column.
     </p>
     <p>
      The
      <code class="literal">
       UNIQUE
      </code>
      and
      <code class="literal">
       PRIMARY
          KEY
      </code>
      information is about the same as what you get
          from the
      <code class="literal">
       Key_name
      </code>
      column in the output from
      <a class="link" href="show-index.html" title="15.7.7.23 SHOW INDEX Statement">
       <code class="literal">
        SHOW INDEX
       </code>
      </a>
      when the
      <code class="literal">
       Non_unique
      </code>
      column is
      <code class="literal">
       0
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       ENFORCED
      </code>
     </p>
     <p>
      For
      <code class="literal">
       CHECK
      </code>
      constraints, the value is
      <code class="literal">
       YES
      </code>
      or
      <code class="literal">
       NO
      </code>
      to indicate
          whether the constraint is enforced. For other constraints, the
          value is always
      <code class="literal">
       YES
      </code>
      .
     </p>
    </li>
   </ul>
  </div>
 </div>
 <br/>
</div>
