跨数据库联合查询

select * from
(
select * from [数据库名A].dbo.表A where 条件) a,
(
select * from [数据库名B].dbo.表B where 条件) b
where a.字段  = b.字段

猜你喜欢

转载自xiaochengfu1.iteye.com/blog/1832441