insert TABLE1
select * from TABLE2 where 关键字 not in (select 关键字 from TABLE1)

解决方案 »

  1.   

    update a set a.字段=b.字段 from TABLE1 as a,TABLE2 as b where a.关键字=b.关键字
      

  2.   

    --修改关键字段相同的
    update table1 set table1.其它字段=talbe2.其它字段 from table2 where table1.关键字段=table2.关键字段--插入关键字段不同的(与上面一句同时使用)
    insert TABLE1
    select * from TABLE2 where 关键字 not in (select 关键字 from TABLE1)