码迷,mamicode.com
首页 > 数据库 > 详细

sql统计重复数据

时间:2015-07-08 12:52:44      阅读:176      评论:0      收藏:0      [点我收藏+]

标签:

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

 

技术分享

 

sql统计重复数据

标签:

原文地址:http://www.cnblogs.com/double405/p/4629781.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!