mysql duplicate data deletion
This shows me all the first names and last names that have exactly two entries that are identical SELECT `firstname`,`lastname`,COUNT(*) AS Count FROM `people` GROUP BY `firstname`,`lastname` HAVING Count = 2 How do I turn this into a DELETE FROM WHERE statement with a LIMIT to only remove one of each of the entries and leave the other one. okay this appears to be way to technical i'm just going to do it in a php while loop You can create a table with 1 record of each of the duplicates: Then delete all the dup records from the people table and then re-insert the dup records. -- Setup for