mysql delete duplicate rows except one
snippet in sql

mysql delete duplicate rows except one

user1139

DELETE FROM NAMES
 WHERE id NOT IN (SELECT * 
                    FROM (SELECT MIN(n.id)
                            FROM NAMES n
                        GROUP BY n.name) x)