遇到一个导数据的问题.偶有表A和表B,他们的表结构都一样.A表有数据,
偶通过exp导出数据保存导exp.dmp
偶然后想通过imp导入表B.怎么实现啊?

解决方案 »

  1.   

    为什么要导出,再导入呢,直接执行以下语句就可以了
    insert into B select * from A
      

  2.   

    先imp到一样的表名,再用insert into b select * from a
      

  3.   

    不是这个意思,偶数据是来自外面的,现在数据库里面的数据是我自己添加的,以后来的结构一样,但是包括schema和表都可能不一样的.所以偶想问下有办法导吗?
      

  4.   

    时间长了,记不清语法了,好像是imp file=exp.dmp table_name=xxxx
    查帮助看看man imp
      

  5.   

    D:\>exp scott/tiger file=a.dmp 
    D:\>imp test/test fromuser=scott tables=emp file=a.dmp
    D:\>imp test/test tables=dept file=a.dmp
      

  6.   

    exp hsman/password@si rows=y indexes=n compress=n buffer=65536 tables=tableName
    file=e:\exp20050714.dmp 
    imp hsman/888@hs  rows=y indexes=n 
    commit=y buffer=65536 
    file=e:\exp20050714.dmp
    tables=tableName