u can extract data from different table using the joins in sql
using inner join
outer join etc.

1 User has rated as useful.
Login to rate this answer.
@ dugulam: I would have agreed with your answer if both the databases were of the same type. Meaning if both the DBs were Oracle or both were SQL Server. But, the example in the question involved different DBs altogether. There may be a common table but there would be an interface in place for both DBs to talk; or between destination DB and each of the source DBs. In any case there would be an interface in place for different DBs to talk to each other. One cannot just open a query tool and write a query to extract data. If it were that simple, why do we need tools/technologies like DTS, SSSL packages (MS) etc., to extract data from different sources.
To extract data from different data sources including different DBs, flat files, etc., some type of ETL tool must be used to extract, transform and load data into destination database. I believe this question must have stemmed from the resume of the interview candidate who posted this question; or it must have been a general question. Regardless, the answer is ETL tool or technology. The reason I keep saying tool/technology is because Microsoft had introduced SSSL packages to perform ETL. For example, DTS is an ETL tool.
Again, selection of the tool/technology depends on the data sources and destination DB being used as all ETL tools/technologies may not be compatible with all DBs and interfaces.
Login to rate this answer.