Hi,
Here is sample select query:
select e.emp_no,e.emp_name,e2.added_date
from Database1.dbo.Table1 e
inner join Database2.dbo.Table2 e2 on e.id=e2.id
Further you may get help from below link:
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
how do write a sql query that joins a table in one database to a table located in another database in the same SQL Server
Hi,
Here is sample select query:
select e.emp_no,e.emp_name,e2.added_date
from Database1.dbo.Table1 e
inner join Database2.dbo.Table2 e2 on e.id=e2.id
Further you may get help from below link: