Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / database / SQL-Server

To find duplicate rows in table

4.91/5 (4 votes)
31 Jan 2012CPOL 46.5K  
To find duplicate rows in table
SQL
--To find duplicate rows in table

select colname, count(colname) from TableName
Group by colname Having (count(colname) > 1)

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)