我在同一台服务器上有两个数据库。我对每个正常工作的数据库都有两个简单的选择查询。但是,当组合成一个连接时,它们会失败。我想解决这个问题。
伪代码 -
select *
from (select columns from DB1) as D1
inner join
select *
from (select columns from DB2 where some valid condition) as D2
on D1.column1 = D2.column1
错误 -
Incorrect syntax near the keyword 'SELECT'. (ie second "outer" select)
Incorrect syntax near the keyword 'on'.