本帖最后由 chemstudy 于 2011-12-12 13:46:29 编辑

解决方案 »

  1.   

    insert into d1.t1
    select a.* from d2.t1 left join d1.t1 b on a.itemid=b.itemid where b.itemid is null
      

  2.   

    表别名,上述代码a写掉了insert into d1.t1
    select a.* from d2.t1 a left join d1.t1 b on a.itemid=b.itemid where b.itemid is null
      

  3.   

    insert into  d1.table1
    select * from d2.table2 where id not in (select id from d1.table1)