数据库1:AAA数据库2:BBB数据库名和表名之间放两个点 select * from [AAA]..TableA a inner join [BBB]..TableB b on a.AcountID = b.ClientID