SQL语句问题? SELECT COUNT(*) FROM table where xh = 'xxx'如果结果大于1, 就表明有重复的字段值 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select count(xh) as 重复数,xh from Tgroup by xh select * from (select count(*) as cnt,xh from Tgroup by xh) awhere a.cnt>1 select * from yourtable where (select count(xh) from yourtable)>1 select xh from yourtable group by xh having count(xh)>1 如果想显示所有学号为重复记录的话则:select * from yourtable where xh in(select * from student where (select count(id) from student)>1) sql server中如何实现双重for循环 审核入库单 请教解决一个简单的sql语句 求助一句SQL (查询不重复数据,如果重复只保留价格最低的一条) SQL语句 在线等~ 请问这个SQL如何写 请问怎么加密存储过程? 不用or求出name=1,name=2,name=3的表值? 请教 DataTable 中索引值的控制! 我想在我的程序中控制oracle数据库的备份与恢复怎么办? 关于数据的存取 SQL Server 2000企业版 能是WIN2000专业版 上安装吗?
group by xh
(
select count(*) as cnt,xh from T
group by xh
) a
where a.cnt>1
select * from yourtable where xh in(select * from student where (select count(id) from student)>1)