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 2000 Forums
 SQL Server Development (2000)
 getting data from different databases

Author  Topic 

VivekReddy
Starting Member

2 Posts

Posted - 2007-10-06 : 05:10:01
Is it possible to retrive data from different databases in a select statement?

if possible just give me the synyax..

thanks and regards,
Vivek.B

Vivek.B

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-10-06 : 05:14:51
[code]select *
from db2.dbo.table1[/code]


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-10-06 : 05:45:47
Or perhaps

SELECT *
FROM db1.dbo.table1 AS T1
JOIN db2.dbo.table2 AS T2
ON T2.ID = T1.ID

Kristen
Go to Top of Page
   

- Advertisement -