查询重复列问题 求助 select identity(int,1,1) as id,* into #T from 表Aselect a.* from #T a where not exists(select 1 from #T where vol1=a.vol1 and id<a.id) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 declare @t table(vol1 int,vol2 int,vol3 int)insert into @t select 1,1,1insert into @t select 1,0,1insert into @t select 2,1,0insert into @t select 3,3,1insert into @t select 2,3,4select a.* from @t a where not exists(select 1 from @t where vol1=a.vol1 and vol2>a.vol2)?8vol1 vol2 vol3 ----------- ----------- ----------- 1 1 13 3 12 3 4*/ 哦 这个无所谓 要那个都行只要是提取出来 vol1 不同的旧可以但是你的方法 似乎有时候不行比如2 0 32 0 4如果用你的方法的话 这2个会都出现 求一条sql语句 数据类型转换的问题,可能比较菜 SQL Server 2005 同步数据到 SQL Server 2000 问题? 触发器应用 怎样设置不能查询表的某个字段? 怎么将sql表导成dbf表(只能用SQL语句) 这个问题真的很难吗? 基本问题--TEXTPTR Crazy SQL Server, size keep increasing 各位快帮帮我,关于job的问题,很急,本周内解决啊(就明天一天时间了)!!! 请问在微软平台上搭配oracle或SQL Server各自的利与弊? 请教一个SQL语句 数据还原的问题
insert into @t select 1,1,1
insert into @t select 1,0,1
insert into @t select 2,1,0
insert into @t select 3,3,1
insert into @t select 2,3,4
select
a.*
from
@t a
where
not exists(select 1 from @t where vol1=a.vol1 and vol2>a.vol2)?8
vol1 vol2 vol3
----------- ----------- -----------
1 1 1
3 3 1
2 3 4*/
比如
2 0 3
2 0 4如果用你的方法的话 这2个会都出现