Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Optimal way to use different dabases

Author  Topic 

Hovkar
Starting Member

1 Post

Posted - 2010-07-29 : 03:31:25
Hi all.

I have two different databases. I have task, I need to join table from first DB with table from second DB. Which is the optimal solution?

Thanks.

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-07-29 : 03:57:30
select ...
from firstDB..table1 t1
join secondDB..table2 t2 on t1.idColumn = t2.idColumn


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -