Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: using two databases with one SQL statement

Re: using two databases with one SQL statement

From: Hoang-Vu PHUNG <hoang-vu_at_freesurf.ch>
Date: Fri, 10 Dec 1999 14:27:34 +0100
Message-ID: <82qv3i$486$1@news1.sunrise.ch>


Of course. Suppose that you are connected to the database a when issuing your SQL. All you must do is to declare a Database link (public or private) to the other database. If you name this link dblink, then you can access any table (if you have rights) by appending dblink to table name like my_table_at_dblink

Sample:
database a: table1, with link dblink to database b database b:table2
then this sql must work:

select * from table1, table2_at_dblink where ...

Hope that helps

Dirk Gómez <djg_at_cs.tu-berlin.de> wrote in message news:3850d5a4.147253469_at_news.cs.tu-berlin.de...
> Hullo,
>
> is it possible to work with two Oracle databases with one SQL
> statement. Something like this:
>
> Select * from <database_a>, <database_b> where
> <database_a>.table_a.field1= <database_b> .table_b.field3
>
> cheers Dirk
Received on Fri Dec 10 1999 - 07:27:34 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US