merge into t2
using t1
on(t1.主键 = t2.主键)
when matched then
update set --注意此处不能更新关联条件
t2.col1 = t1.col1,
t2.col2 = t1.col2,
t2.col3 = t1.col3,
t2.col4 = t1.col4
when not matched then
insert into(主键,col1,col2,col3,col4)
values(t1.主键,t1.col1,t1.col2,t1.col3,t1.col4)
;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货