Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

mysql delete older duplicates

 delete test
   from test
  inner join (
     select max(id) as lastId, email
       from test
      group by email
     having count(*) > 1) duplic on duplic.email = test.email
  where test.id < duplic.lastId;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mysql #delete #older #duplicates
ADD COMMENT
Topic
Name
3+4 =