How to find multiple/duplicate rows with the same value

Just a short SQL script which will allow you to find mutiple rows with same values in a table. Since its a very straightforward query, it needs no further explanation :)


select [column_name]
from [tablename]
group by [column_name]
having count(*) > 1
— � OR

Select * from [TableName] where [ColumnName] IN (
select [ColumnName] from (
select count([ColumnName]) as N, [ColumnName] from [TableName]
— Where Clause If needed
group by [ColumnName]
where N > 1


There is a similar article which describes more techniques to follow for managing duplicate rows from a table .