34,590
社区成员
发帖
与我相关
我的任务
分享
select a.id , a.temp , a.a , a.b , b.c from a , b where a.id = b.id and a.temp = b.temp
select id,
temp,
max(a) as a,
max(b) as b,
max(c) as c
from TA
group by
id,
temp
select m.id,m.temp,isnull(m.a,n.a)a,isnull(m.b,n.b)b,isnull(m.c,n.c)c from
库1..表名 m left join 库2..表名 n
on m.id=n.id and m.temp=n.temp