Wednesday, June 23, 2010

Detect Duplicate entries in table by composite key

table TABLE_NAME has key1 , key2 , key3 columns .


select key1,key2, key3 from TABLE_NAME group by key1, key2 , key3 having count(*)>1

No comments: