Friday, February 26, 2010

How to find duplicate records in SQL Server?

This is not a tuff job to do but recently one my friend asked me the same question and i replied with the following query.

SELECT SKUID, COUNT(SKUID) FROM SKURequests
GROUP BY SKUID
HAVING COUNT(SKUID) > 1

 

Even though it is very simple, i thought to share in my blog so it may help some one who needs it.

0 comments:

Post a Comment