How to find duplicate entries in a table

By emre gokhan saricicek, February 12, 2010 3:17 PM

Recently I needed to find duplicate entries for some employees on my table. Here is a handy query
SELECT `pid`, COUNT(`pid`) AS Nummber_of_Occurrences FROM employees GROUP BY `pid` HAVING ( COUNT(`pid`) > 1 )

Zenteric is powered by Sa-Za