Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: select from another database
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
![]() |
![]() |