创建DB-LINK
create public database link dblink_名字
connect to 账户名字 identified by 账户密码
using ‘(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 数据库所在地址)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = 目标数据的名字)
)
)‘;
建立完数据库取数据:
CREATE 表名 AS SELECT * FROM 表名@dblink_名字;
时间: 2024-12-28 20:20:07