我试着用数据库链接做到这一点:
http://download.oracle.com/docs/cd/B28359_01/server.111/b28310/ds_concepts002.htm
但是,这不是SQL*Plus功能.它的工作原理是建立从DB2到DB1的连接(数据库正在这样做).
You can then query both tables from DB2 with the '@db-link' name notation. e.g.,
select *
from TABLE_ONDB2
where column_on_db2
in (select column_on_db1 from TABLE_ONDB1@DB_LINK_NAME);
^^^^^^^^^^^^^
Run Code Online (Sandbox Code Playgroud)
The benefit is that you can access the table in all different ways, also as a join.