把A字段有两条以上的相同记录选出来 select * from tablename where a in (select uid from user group by uid having count(uid)> 1 )