Join tables from different databases

This can be achieved by joining the tables or indicating the tables using Fully Qualified names.

 

SELECT t1.id, t1.name

FROM AdventureWorks.dbo.Venkat_Table1 t1

INNER JOIN

AdventureWorksLT2008R2.dbo.Venkat_Table2 t2

ON t1.id = t2.id