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