Oracle不支持直接通过Database Link复制远程数据库表的CLOB/BLOB字段数据到本地数据库。
像如下的SQL是不能执行的。(ipop_topic表有一个CLOB的字段)
insert into ipop_topic
select * from ipop_topic@prod.us.oracle.com where application_id=1000
但是,我们可以借助全局临时表,先把数据复制到临时表,再从临时表转移到你的目的表。
create global temporary table ipop_topic_temp
as select * from ipop_topic@prod.us.oracle.com where rownum=1
insert into ipop_topic_temp
select * from ipop_topic@prod.us.oracle.com where application_id=1000
insert into ipop_topic
select * from ipop_topic_temp
commit