Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in SQL Server only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
SQL Server
Linking 2 Databases
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
confused99
New Member
Join Date:
May 2007
Posts:
9
#1
Linking 2 Databases
Jun 5 '07, 03:42 PM
How do i get a query in 1 database to fetch results from a table in another database?
I am using MSSQL 2005
BHARATH RS
New Member
Join Date:
May 2007
Posts:
6
#2
Jun 12 '07, 06:37 AM
I hope ur question is like this
You have 2 database DB1 and DB2. You want to select Tab2 in DB2 while you are executing the query in DB1.
The query would be like this
Select *
From DB2.dbo.Tab2
the general syntax would be
Select <column1>,<colu mn2>.......
from <database_name> .dbo.<table_nam e>
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment