How to delete duplicate values in a column in mysql table

    You can delete duplicate values in column using below query replace the tablename and fieldname before using it
    DELETE temp1.*
    FROM cities AS temp1
       INNER JOIN (
          SELECT city
          FROM cities
          GROUP BY city
          HAVING COUNT(*) > 1
       ) AS temp2 ON temp2.city = temp1.city
    5
    Average: 5 (1 vote)