Discussion:
select & join different tables accrose different databases
(too old to reply)
y***@tw.ibm.com
2007-09-20 06:47:11 UTC
Permalink
Hi,

Is that possible to write a single SQL statement which can join different tables resides in different database? just like

select tab1.col1, tab2.col1 from db1.schema1.table1 as tab1, db2.schema2.table2 as tab2 where tab1.col2 = tab2.col2
Mark A
2007-09-20 06:57:39 UTC
Permalink
Post by y***@tw.ibm.com
Hi,
Is that possible to write a single SQL statement which can join different
tables resides in different database? just like
select tab1.col1, tab2.col1 from db1.schema1.table1 as tab1,
db2.schema2.table2 as tab2 where tab1.col2 = tab2.col2
Yes, but you will need to enable the database for federated support and
create nicknames and wrappers. See the DB2 manual on Federated support for
details.

Loading...