34,838
社区成员




select 1,* from sysobjects
insert into A(a,b,c)
select y.* from B as y left join A as x on y.a=x.a where x.a is null
--用别名
update x set x.b=y.b,x.c=y.c from A as x join B as y on x.a=y.a
insert A(a,b,c) select * from B as y where not exists (select 1 from A where a=y.a)
update A set A.b=B.b,A.c=B.c from A join B on A.a=B.a
insert A(a,b,c) select * from B where not exists (select 1 from A where a=B.a)
update a set a.b.=b.b,a.c=b.c from a join b on a.a=b.a
insert a(a,b,c) select * from b where not exists (select 1 from a where a=b.a)