22 August, 2014

Find Duplicate Records MySQL Query

Hi All

I know that this is not related Liferay but i came across this useful thing during my development where you can find duplicate record from table and can delete if you need.

SELECT tablename.name FROM tablename
INNER JOIN (SELECT name FROM tablename
GROUP BY name HAVING count(name) > 1) dup_record ON tablename.name = dup_record.name



Popular Posts

Featured Post

Liferay 7.3 compatibility matrix

Compatibility Matrix Liferay's general policy is to test Liferay Portal CE against newer major releases of operating systems, open s...