title: Difference between Unique Key and Primary Keys
body: <p>I came across the following SQL in a book:</p>
  
  <pre><code>CREATE TABLE 'categories'(
  id SMALLINT NOT NULL AUTO INCREMENT,
  category VARCHAR(30) NOT NULL,
  PRIMARY KEY('id'),
  UNIQUE KEY 'category'('category')
  )ENGINE=MyISAM DEFAULT CHARSET = utf8;
  </code></pre>
  
  <p>I was wondering is there a reason why I would need a PRIMARY and UNIQUE KEY in the same table? I guess, underlying that question is, what is the difference between PRIMARY and UNIQUE keys?</p>