Reputation: 3520
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?
Upvotes: 0
Views: 639
Reputation: 1579
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 ...
Upvotes: 1