Search This Blog

Wednesday, April 25, 2012

Searching duplicate Record

Very often we have to look for duplicate records in the database, Below is the query which can give you the result.

SELECT COL1, COL2 , ...., Count(COLx) from TABLE_NAME GROUP BY COL1, COL2 , .... HAVING CONDITION AND Count(COLx)>1

Searching duplicate Record

Very often we have to look for duplicate records in the database, Below is the query which can give you the result. SELECT COL1, COL2 , ...