esedic
4/27/2017 - 4:28 PM

Find duplicate values in MySQL

Find duplicate values in MySQL

SELECT GROUP_CONCAT(id), name, COUNT(*) c FROM table_name GROUP BY name HAVING c > 1;

SELECT name, COUNT(*) c FROM table_name GROUP BY name HAVING c > 1;