insert into table1
select * from table2 where not exists(select 1 from table1 where table1.主键字段1=table2.主键字段1 and table1.主键字段2=table2.主键字段2)
--插入table2-table1的记录update table1
set col1=a.col1,col2=a.col2...
from table2 a
where table1.主键字段1=a.主键字段1 and table1.主键字段2=a.主键字段....
--覆盖
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货