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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Two tables from separate Sql Server

Author  Topic 

cnaypi
Starting Member

22 Posts

Posted - 2008-09-08 : 16:44:49
Is there a way to query two tables from two separate SQL Server database?

Example I have a Sql Server Peach and I have a database in the Peach server called Peachy. I also have another Sql Server Apple and I have a database in the Apple server called Appleblossom. Now I want to query the tables between the two databases. Is there a way to do that?

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2008-09-08 : 16:52:50
There are several methods. Two that I know about off the top of my head are Linked Servers and OPENQUERY. Both can be found in BOL (Books Online).
Go to Top of Page
   

- Advertisement -