How-to find duplicates in SQL table on certain fields

How-to find duplicates in SQL table on certain fields

Here is SELECT statement to find duplicates in SQL table on certain fields:

SELECT `field1`, `field2`, COUNT( * ) 
FROM `table`
GROUP BY `field2`
HAVING COUNT( * ) >1

 

sql (en)

  • Hits: 2447
Add comment

Related Articles