Using COUNT to find duplicate records in a table

Bhutan
September 19, 2006 5:00am CST
I tried using the following SQL Script to find out duplicate records in a table SELECT COUNT(Per_ID) FROM TableName HAVING COUNT(Per_ID) 1 group BY Per_ID However I could not get the SQL Script working. Can somebody please help me....
1 response
• Philippines
27 Apr 09
Original: SELECT COUNT(PER_ID) FROM TABLE_NAME HAVING COUNT(PER_ID) 1 GROUP BY PER_ID I think its just the structuring, try SELECT COUNT(PER_ID) CNT FROM TABLE_NAME GROUP BY PER_ID HAVING CNT 1