Find duplicate records in MySQL

后端 未结 23 2851
别跟我提以往
别跟我提以往 2020-11-21 23:12

I want to pull out duplicate records in a MySQL Database. This can be done with:

SELECT address, count(id) as cnt FROM list
GROUP BY address HAVING cnt >         


        
23条回答
  •  花落未央
    2020-11-22 00:00

    This also will show you how many duplicates have and will order the results without joins

    SELECT  `Language` , id, COUNT( id ) AS how_many
    FROM  `languages` 
    GROUP BY  `Language` 
    HAVING how_many >=2
    ORDER BY how_many DESC
    

提交回复
热议问题