create table ##t(id int ,filename1 varchar(100),filename2 varchar(100))
insert into ##t(id,filename1,filename2)
select 1,'a',null union all
select 1,null,'c' union all
select 2,null,'d' union all
select 2,'f',null--select * from ##tselect id,max(filename1) as filename1,max(filename2) as filename2
from ##t
group by id
order by iddrop table ##t/*
id filename1 filename2
------------------------------------------
1 a c
2 f d*/
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货