随笔 - 11  文章 - 2  评论 - 1

sql统计重复数据

sql代码如下:

统计重复的数据

select MingCheng from tabShouFeiGongShi group by MingCheng having count(MingCheng) >= 2


select * from
(select *
from tabShouFeiGongShi
where  MingCheng in (select MingCheng from tabShouFeiGongShi group by MingCheng having count(MingCheng) >= 2)) t  order by MingCheng

 

 

posted @ 2015-07-08 12:03  Double405  阅读(2872)  评论(0编辑  收藏  举报