Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

delete all duplicate rows keep the latest except for one in mysql

DELETE 
FROM
  `tbl_job_title` 
WHERE id NOT IN 
  (SELECT 
    * 
  FROM
    (SELECT 
      MAX(id) 
    FROM
      `tbl_job_title` 
    GROUP BY NAME) tbl)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #delete #duplicate #rows #latest #mysql
ADD COMMENT
Topic
Name
1+8 =