Santosh Hegde Santosh Hegde - 5 months ago 15x
Java Question

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 ...)