Quote:
|
Originally Posted by thesandman
I want to join tables from 2 different databases.
I have a table in 1 db in which i want to join with in another table in abother db.
Can this be done and what is the syntax?
Thanks
Rich
|
You just need to prefix the tablename with the database name, for example:
select a.col1, b.col2
from database1.tablename a
inner join database2.tablename b on (a.id=b.id)
where b.col2 = 33