我正在尝试将来自不同模式的表(ConnTest1 - Table1,ConnTest2 - Table1,ConnTest3 - Table1)合并到Oracle SQL Developer中的一个模式ConnTest1中。
以下是我的剧本:
CREATE DATABASE LINK ONETWODBLINK
CONNECT TO user2 IDENTIFIED BY pass2
USING 'ConnTest2'; -- Need to provide connection string but I have given name of schema/connection
CREATE DATABASE LINK ONETHREEDBLINK
CONNECT TO user3 IDENTIFIED BY pass3
USING 'ConnTest3';
Select *
From Table1 -- for connection 1
Union all
select *
from Table1@ONETWODBLINK -- for connection 2
union all
select *
from Table1@ONETHREEDBLINK; --- for connection 3