Find duplicate records in MySQL

后端 未结 23 2882
别跟我提以往
别跟我提以往 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:05

    I tried the best answer chosen for this question, but it confused me somewhat. I actually needed that just on a single field from my table. The following example from this link worked out very well for me:

    SELECT COUNT(*) c,title FROM `data` GROUP BY title HAVING c > 1;
    

提交回复
热议问题