17,092
社区成员
发帖
与我相关
我的任务
分享
merge into table1 t1 using table2 t2
on (t1.column1=t2.column1 and ...) --两个表的关联
when matched then
update set t1.column2=t2.column2 and ...;
when not matched then
insert (column1,...) values(t2.column1,...);