34,587
社区成员
发帖
与我相关
我的任务
分享
update 目的表 set
col1=a.col1
col2-a.col2
...
from 目的表,临时空表 a
where 目的表.主键=a.主键
insert 目的表(...)
select ... from 临时空表 a
where not exists (
select 1 from 目的表
where 目的表.主键=a.主键
)
drop table 临时空表