title: Delete all Duplicate Rows except for One in MySQL?
body: <p>How would I delete all duplicate data from a MySQL Table?</p>
  
  <p>For example, with the following data:</p>
  
  <pre><code>SELECT * FROM names;
  
  +----+--------+
  | id | name   |
  +----+--------+
  | 1  | google |
  | 2  | yahoo  |
  | 3  | msn    |
  | 4  | google |
  | 5  | google |
  | 6  | yahoo  |
  +----+--------+
  </code></pre>
  
  <p>I would use <code>SELECT DISTINCT name FROM names;</code> if it were a <code>SELECT</code> query. </p>
  
  <p>How would I do this with <code>DELETE</code> to only remove duplicates and keep just one record of each?</p>