how to duplicate value delate by using id except one in mysql code example
Example: mysql delete duplicate rows except one
DELETE FROM NAMES
WHERE id NOT IN (SELECT *
FROM (SELECT MIN(n.id)
FROM NAMES n
GROUP BY n.name) x)