34,594
社区成员
发帖
与我相关
我的任务
分享
select a.a_id,a.b_id,a.c_id,a.price0,b.price1,b.price2
from #t1 a left join #t2 b
on
a.a_id=b.a_id and isnull(a.b_id,0)=isnull(b.b_id,0) and a.c_id=b.c_id
select
isnull(a.a_id,b.a_id) as a_id,
isnull(a.b_id,b.b_id) as b_id,
isnull(a.c_id,b.c_id) as c_id,
isnull(b.price1,'') as price1,
isnull(b.price2,'') as price1
from
#t1 a
full join
#t2 b
on
a.a_id=b.a_id and a.b_id=b.b_id and a.c_id=b.c_id
select
a.*,
isnull(b.price1,'') as price1,
isnull(b.price2,'') as price1
from
#t1 a
full join
#t2 b
on
a.a_id=b.a_id and a.b_id=b.b_id and a.c_id=b.c_id