---1、在本地创建包含blob的临时表 create global temporary table temp1 (a varchar2(20),x BLOB) on commit delete rows ---2、在本地创建目标临时表 CREATE TABLE TEMP2 AS select * from temp1 where 1=2 ---3、将远程表的数据插入到临时表中 INSERT INTO temp1 select smt_salaryno,smt_photo from ecard.photo@lk_ykt ---千万不要comit,不然temp1表的数据会变清空 --4、将临时表中的数据插入到目标临时表 INSERT INTO TEMP2 select * from temp1 --5、针对包含blob表去重的
方法 insert into jw_jg_jzgzpb select a,x from ( select a,x,row_number() over(partition by a order by a) px from yhb a,TEMP2 b where yhlx='teacher' and a.yhm=b.a and a in ( SELECT distinct a FROM TEMP2 group by a having count(*)>1 ) ) where px=1