sql 查询重复数据

有表A,   中有字段id, name, memo
现在有很多id重复的数据,怎么把这些重复的都查出来?
group by?  
select id, name, memo
from A
where id in (select id from A group by id having count(1) >= 2)

猜你喜欢

转载自minyongcheng.iteye.com/blog/2064269
今日推荐