Wednesday, March 7, 2012

Find Duplicated value

I have a table having 50000 rows. One field(Name) of the table may have duplicated data. How can I get all the duplicated data?

Hi,

what about

SELECT SomeColumn
FROM SomeTable
GROUP BY SomeCOlumn
HAVING COUNT(*) > 1

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

No comments:

Post a Comment