title: How to add Composite Primary Key and remove duplicates on existing table?
body: <p>I have a very simple table called favorites with two columns user and content. How do I add a composite primary key on these columns and remove all duplicates (eg. same content AND user value)</p>
  
  <pre><code>ALTER TABLE favorites
  ADD PRIMARY KEY (user,content)
  </code></pre>
  
  <p>Gives errors like #1062 - Duplicate entry '24-26885' for key 'PRIMARY'</p>