insert into test1 select * from test2 或者删除要导入的表 drop table test1 create table test1 as select * from test2
如果有重复的数据有可能插不进去的啊!! 先清表 truncate table xxx; 或者先去掉历史数据表的限制条件!!! 再插数据啊!! insert into xxx select * from xxxx;
谢谢各位了,一时忘了子查询! 我用了另一种方法: set copycommit 1 set arraysize 1000 copy from <db>- append now_tbname- using select * from old_tbname; 由于要导的数据量比较大,我想这个方法可能会更好,不知大家有何意见!?
或者删除要导入的表
drop table test1
create table test1 as select * from test2
先清表 truncate table xxx;
或者先去掉历史数据表的限制条件!!!
再插数据啊!!
insert into xxx select * from xxxx;
我用了另一种方法:
set copycommit 1
set arraysize 1000
copy from <db>-
append now_tbname-
using select * from old_tbname;
由于要导的数据量比较大,我想这个方法可能会更好,不知大家有何意见!?
在局于网中,可以用dblink解决不同数据库的数据传输问题
copy实际是基于dblink的
若同库的,楼上的说的很精彩