Remove duplicate rows leaving oldest row Only?
I have a table of data and there are many duplicate entries from user submissions. I want to delete all duplicates rows based on the field subscriberEmail , leaving only the original submission. In other words, I want to search for all duplicate emails, and delete those rows, leaving only the original. How can I do this without swapping tables? My table contains unique IDs for each row. Since you're using the id column as an indicator of which record is 'original': delete x from myTable x join myTable z on x.subscriberEmail = z.subscriberEmail where x.id > z.id This will leave one record per