title: Getting table metadata in MySQL
body: <p>I'm trying to find out how to get the following constraint information from a table in MySQL 5.0: </p>
  
  <ul>
  <li>primary key</li>
  <li>foreign keys and table references</li>
  <li>unique columns</li>
  </ul>
  
  <p>What is the syntax of the query or queries to do so? I have a feeling I'm close with <a href="http://dev.mysql.com/doc/refman/5.0/en/table-constraints-table.html" rel="noreferrer">this</a>, but there is no example.</p>