title: "Alter ignore" + "unique key" to remove duplicates, mysql and sql server
body: <p>I have a table containing some duplicate values for 1 column, ie with table <code>emails</code></p>
  
  <pre><code>id email
  1  test@test.com
  2  test@test.com
  3  more@most.many 
  4  cook@sheep.com
  </code></pre>
  
  <p>I'd like to remove row with id '2'. And I'd like to do this by creating a unique index of <code>email</code> thus forcing the table to drop redundancies. </p>
  
  <p>I have seen this method referenced here(<a href="http://www.it-iss.com/mysql/sql-removing-duplicate-records/" rel="nofollow noreferrer">http://www.it-iss.com/mysql/sql-removing-duplicate-records/</a>) and <a href="https://stackoverflow.com/questions/19000050/how-to-delete-first-of-a-double-record-with-alter-ignore-command-in-mysql">https://stackoverflow.com/questions/19000050/how-to-delete-first-of-a-double-record-with-alter-ignore-command-in-mysql</a> </p>
  
  <p>But when I attempt the statement 
  <code>alter ignore table emails_test add unique index(email)</code></p>
  
  <p>I get a duplicate entry error for test@test.com, as if I never included the <code>ignore</code> keyword</p>
  
  <p>Is there something I'm missing here? If this is not possible, what are alternative methods of deleting duplicates that are simpler than, say, using temporary tables <a href="https://stackoverflow.com/questions/45494/mysql-error-1093-cant-specify-target-table-for-update-in-from-clause">MySQL Error 1093 - Can&#39;t specify target table for update in FROM clause</a> </p>