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: select from another database

Re: select from another database

From: TurkBear <john.greco_at_dot.state.mn.us>
Date: Thu, 30 Jan 2003 12:59:36 -0600
Message-ID: <acti3v4rm3futp02jn6dv9eet7d1dbbbm7@4ax.com>

Look at the docs on Database links:

create database link otherdb connect username identified by password using 'tnsnamesalias'

then
insert target_table (field1, field2)
select fld1, fld2
from scheme.sourcetable_at_otherdb

The are some 'gotchas' related to the global parameter in the target database instance, so read first, then try...

imanzuk_at_enternet.hu (mistvan) wrote:

>Hi Folks!
>
>I would like to know how can I select rows from another database and
>insert them into the actual.
>Eg. I'm logged in db1, and there is a database called db2. So, how
>should I complete the insert statement below:
>insert target_table (field1, field2)
>select fld1, fld2
>from scheme.sourcetable_at_db2
>
>I think I don't know something. Please let me know.
>
>Thanks in advance,
>mistvan
Received on Thu Jan 30 2003 - 12:59:36 CST

Original text of this message

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