mssql如何只显示有重复的数据呢? mssql如何只显示有重复的数据呢?有重复的数据就显示一条重复的数据,没重复的不显示,查询语句该怎么写呢?谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select * from tablename where id in (select id from tablename group by id having count(id) > 1) select distinct * from tablename where id in ( select id from tablename group by id having count(id) > 1 ) select distinct * from tablename where id in ( select id from tablename group by id having count(id) > 1 ) SELECT DISTINCT Top(100) xx,tt FROM table或者参考http://blog.csdn.net/ZOU_SEAFARER/archive/2009/09/25/4592519.aspx VB中的Adodc1.RecordSource中可以使用SQL的插入insert或delete语句? 请大家帮忙看看这段程序哪里出错了!!! vb中,一个关于dtpicker的问题? 关于数据库更新的问题 请问有朋友知道怎么解决这个问题吗?(急~~~) VB中截取字符串用什么方法? 数据绑定出错 ,帮帮看错在那里 VB+Access 我想把一个picturebox里的图片,复制到剪贴板,并且在文件夹中能够实现粘贴功能,怎么办 开了论坛~~~~帮忙测试一下 从程序中生成Exe文件 ---提问 vb中如何修改局域网电脑的网关或dns? 在线等VB BHO判断网页完全加载
select id from tablename
group by id
having count(id) > 1
)
select id from tablename
group by id
having count(id) > 1
)
from tablename
where id in (
select id from tablename
group by id
having count(id) > 1
)
http://blog.csdn.net/ZOU_SEAFARER/archive/2009/09/25/4592519.aspx