简体   繁体   中英

How can I copy data from one DB to another oracle DB?

I want to update a column of a table. But the required Data is available in another oracle DB.Which is the best way to copy data from remote DB to my DB.

Should I go with Java program or can I achieve it in PL/SQL itself?

If I correctly understood the question, you need to set the value of a column with a value extracted from another table of another DB. The two DBs have different structure.

In this case you can do it with just SQL and a database link.

Here's how to create an Oracle database link: Oracle documentation for database links

Then you can write a query like following:

UPDATE local_table
SET local_column = (SELECT remote_column FROM remote_table@remote_db WHERE ...)
WHERE ...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM