Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

Remove duplicate old value in mysql

DELETE `yellow_page_content`
   from `yellow_page_content`
  inner join (
     select max(`id`) as lastId, `code`
       from `yellow_page_content`
      group by `code`
     having count(*) > 1) duplic on duplic.code = yellow_page_content.code
  where yellow_page_content.id < duplic.lastId;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Remove #duplicate #mysql
ADD COMMENT
Topic
Name
7+8 =