数据库中某字段值允许重复
如何列出该字段所有具有重复值的记录?
---------------------------------------------------------------
哎,看错了楼主的要求
select * from yourtable where a in (select a from yourtable group by a having count(a)>1)
---------------------------------------------------------------
select aaa,count(aaa) as num from table where 1=1
group by aaa having count(aaa)>1