例如: select * from a.dbo.a1 t1 ,b.dbo.b1 where t1.id=t2.id名称格式: 数据库名.所有者名.表名
例如: select * from a.dbo.a1 t1 ,b.dbo.b1 t2 where t1.id=t2.id名称格式: 数据库名.所有者名.表名
select A.*,B.* from a.dbo.a1 A,b.dbo.b1 B where A.id=B.id好像是这样~~~
在同一服务器 select * from a.dbo.a1 a,b.dbo.b1 b where a.id=b.id 不同服务器 select * from openrowset('sqloledb','a数据库服务器名或者ip';'sa';'密码',a.dbo.a1) a,b.dbo.b1 b where a.id=b.id
select * from a.dbo.a1 t1 ,b.dbo.b1 where t1.id=t2.id名称格式:
数据库名.所有者名.表名
select * from a.dbo.a1 t1 ,b.dbo.b1 t2 where t1.id=t2.id名称格式:
数据库名.所有者名.表名
from a.dbo.a1 A,b.dbo.b1 B
where A.id=B.id好像是这样~~~
select * from a.dbo.a1 a,b.dbo.b1 b where a.id=b.id
不同服务器
select * from openrowset('sqloledb','a数据库服务器名或者ip';'sa';'密码',a.dbo.a1) a,b.dbo.b1 b where a.id=b.id