怎么提取唯一的数据 select id,max(n1),max(n2)...from 你的表group by id或:select id,min(n1),min(n2)...from 你的表group by id 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Select identity(int,1,1) as iid,* into #tmp from 表名select id,n1,n2,n3,n4,.. from #tmp where iid in (select max(iid) from #tmp group by id )这样就可以了 select id from yourtablegroup by idhaving count(id)=1 求Microsoft SQL Server 2008技术内幕:T-SQL查询_源代码及附录A SqlServer中如何定时将数据库A中数据导入到数据库B中(我只想copy一个表中的数据) 'SQLOLEDB' 无法启动分布式事务 高手解答 NTEXT 字符串查询 SQL的IF用法 如何合并以下记录。 小于1的数值为什么在NUMERIC(18,2)字段中显示不出来? 一个数据库方面的问题 垃圾問題 或这个触发器怎么设计了? SQL查询啊.看在俺对社会无害的份上,大家帮帮我吧. 一个比较难的问题。
select id,n1,n2,n3,n4,.. from #tmp where iid in (select max(iid) from #tmp group by id )
这样就可以了
group by id
having count(id)=1