mysql查询重复

select * from tablename where id in (   
select id from tablename   
group by id   
having count(id) > 1   
)

原文地址:https://www.cnblogs.com/jiayongchao/p/4271980.html