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.
| Author |
Topic |
|
c.vaibhav
Starting Member
26 Posts |
Posted - 2009-10-24 : 03:48:52
|
| Hi,I have two SQL tables present in two different databases. Can I apply a join to these two tables situated in two separate database and different connections as well.Regards,Vaibhav |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-10-24 : 04:54:17
|
yup. you can. if they're in same server you can just useselect columns...from db1..table1o onejoin db2..table2... and if they're on different server, you need to set up linked server connection to one from other using sp_addlinkedserver sp and then use likeselect columns...from db1..table1o onejoin server2.db2..table2... |
 |
|
|
|
|
|