MYSQL

GET & COUNT DUPLICATE RECORDS IN MYSQL

(quick examples)

ASSUMING ONLY 1 TABLE & COLUMN SELECT `COLUMN` FROM `TABLE` GROUP BY `COLUMN` HAVING COUNT(*)>1

GET DUPLICATE ENTRIES

01

SELECT `COLUMN`, COUNT(*) AS `ROWS` FROM `TABLE` GROUP BY `COLUMN` HAVING `ROWS` > 1

COUNT DUPLICATE ENTRIES

02

SELECT * FROM `TABLE`  WHERE `COLUMN` IN (   SELECT `COLUMN` FROM `TABLE`   GROUP BY `COLUMN`   HAVING COUNT(*) > 1 )

GET ALL DUPLICATES

03