How would I remove all duplicate data from a MySQL Table?
For example, with the following data:
SELECT * FROM names;
+----+--------+
| id | name |
+----+--------+
| 1 | google |
| 2 | yahoo |
| 3 | msn |
| 4 | google |
| 5 | google |
| 6 | yahoo |
+----+--------+
I would practice
SELECT DISTINCT name FROM names
; if it were a
SELECT
query.
How would I do this with
DELETE
to only remove duplicates and keep just one record of each?