Find duplicate row SQL Server


SELECT *
FROM [TableName]
WHERE [ColumnName] IN
(
      SELECT [ColumnName]
      FROM [TableName]
      GROUP BY [ColumnName]
      HAVING COUNT(*) > 1
)
ORDER BY [ColumnName]
Advertisements