insert into old_tbname select * from now_tbname;

解决方案 »

  1.   

    insert into test1 select * from test2
      

  2.   

    insert into test1 select * from test2
    或者删除要导入的表
    drop table test1
    create table test1 as select * from test2
      

  3.   

    如果有重复的数据有可能插不进去的啊!!
    先清表 truncate table xxx;
    或者先去掉历史数据表的限制条件!!!
    再插数据啊!!
    insert into xxx select * from xxxx;
      

  4.   

    谢谢各位了,一时忘了子查询!
    我用了另一种方法:
    set copycommit 1
    set arraysize 1000
    copy from <db>-
    append now_tbname-
    using select * from old_tbname;
    由于要导的数据量比较大,我想这个方法可能会更好,不知大家有何意见!?
      

  5.   

    用copy互导不同oracle数据库相同表结构的数据比较快
      

  6.   

    如果不是异地库,完全不用这么麻烦
    在局于网中,可以用dblink解决不同数据库的数据传输问题
    copy实际是基于dblink的
    若同库的,楼上的说的很精彩