请教高手SQL语句? select t1.* from tbl t1,(select col1 from tbl t2 group by col1)t2 where t1.col1=t2.col1 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select col_1,min(col_2) as col_2 from tblgroup by col_1 select col1,max(col2) as col2 from tbl group by col1 having count(*)=1 select * from table1 where coll in (select coll from table1 group by coll having count(*) =1 ) select col_1,min(col_2) from tbl group by col_1 having sum(1) = 1 看错了:select col_1,min(col_2) as col_2 from tblgroup by col_1having count(*)=1 从速度考虑:select * from tbl awhere not exists (select 1 from tblwhere col_1=a.col_1and col_2<>a.col_2) 第一个错了:select t1.* from tbl t1,(select col1 from tbl t2 group by col1 having count(*)=1)t2 where t1.col1=t2.col1 SQL语句修改! 触发器检查数据有效性 求一个查询方法!! 紧急求一SQL语句!!!!!!!!!!1 数据库构建,高手请入 谁能帮我看下 建立 这 可恶的 3个表 同一表格同一字段每条记录差额的视图,老报错,求解 数据库附加后,在查询分析器里面怎么看不到呢? 临时表排序 急!!为什么我的SQL老是有10%的机会会执行失败!! 在SQL脚本中如何启动服务管理器? sql7.0的数据库打包后如何导入sql2000 server中
group by col_1
group by col_1
having count(*)=1
select * from tbl a
where not exists (
select 1 from tbl
where col_1=a.col_1
and col_2<>a.col_2
)
from tbl t1,(select col1 from tbl t2 group by col1 having count(*)=1)t2
where t1.col1=t2.col1