How to write delete query with inner join?

Query from different database Connections Oracle SQL develoepr?

  • Is it possible to write a query over two different database connections (both are oracle databases - they have different sign on credentials etc) I'm trying to join sales data on a server in the UK to product data on a server in France. Can I do this using standard SQL - what does it look like? I'm familiar with using different user name spaces within one connection (e.g. MIData and MI_dataStore) to different tables but not using entirely different connections... Thanks

  • Answer:

    This would be dependent on your programming language - typically you create a connection object or something similar for each database the app is to connect to...while I'm sure there's an upper limit as to how many connections can be live at a given time (which likewise would depend on the platform), I'm sure just about all can handle 2 simultaneous connections just fine.

Leon S at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

I think the best approach is to use database links (dblinks) from one of your databases to the other. For example, in the UK database, define a "dblink" to the one in France. You can then write your SQL just like a regular join, except that "remote" tables (the ones in the France db) are going to be sufixed with "@dblink_name". The query optimizer will distribute the table access process to the proper databases. For example if your join includes two tables in the remote database, there is a good chance that the optimizer will push this join to be executed on the remote database.

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.