日期:2014-05-18  浏览次数:20376 次

如何在表中查询有相同列的行???????
RT

------解决方案--------------------
select * from table where ff in(select ff from table group by ff having(count(*)> 1))
------解决方案--------------------
select col,重复行数=count(*) from tb group by col having count(*)> 1
------解决方案--------------------
select * from t a
left join
(
select id ,count(*) from t group by id having count(*)> 1
)b on a.id=b.id