SQL Statement to find duplicate data

Sometime we just want to find any duplicate data in the table, this simple statement will help to get the list of duplicate data.

SELECT field1, field2, COUNT(*)
FROM
tableName
GROUP BY
field3
HAVING
COUNT(*) > 1

Tagged: Tags:

Leave A Comment?