一碗白开水*

导航

两数据库Dblink数据抽取blob

在目标数据库建一张临时表
Create global temporary table test3 on commit preserve rows as select * from TEST1 ;
在目前数据库执行
insert into test3 select * from test1 where username='4444';
MERGE INTO TEST2 T1
USING (select * from test3) T2
ON ( T1.username=T2.username)
WHEN MATCHED THEN
UPDATE SET T1.password = T2.password where T1.username = T2.username
WHEN NOT MATCHED THEN
INSERT (T1.username,T1.password) VALUES(T2.username,T2.password);
commit;

posted on 2018-05-29 11:56  一碗白开水*  阅读(221)  评论(0编辑  收藏  举报