SQL查询语句,怎样查询重复数据

SQL查询语句,怎样查询重复数据

2012-02-22 14:50神奇的马骁勇 | 浏览 0 次
有表A,   中有字段id, name, memo
现在有很多id重复的数据,怎么把这些重复的都查出来?
group by? 请写出SQL语句, 谢谢
提问者采纳
 
select id, name, memo
from A
where id in (select id from A group by id having count(1) >= 2)
原文地址:https://www.cnblogs.com/telwanggs/p/4742576.html