2

i have two tables tableA in databaseA on ServerA and tableB in databaseB on ServerB. i just want to perform fullouter join to these tables based on common fieldname of it

nonopolarity
  • 139,253
  • 125
  • 438
  • 698
Sudheesh A P
  • 77
  • 3
  • 9

1 Answers1

3

In SQL Server, you can create a linked server (in Management Studio, that's under Server Objects.) Then you can use a four part name to join the tables:

select  *
from    localdb.dbo.localtable as t1
full outer join
        linkedserver.remotedb.dbo.remotetable as t2
on      t1.col1 = t2.col1

If you're using another database, please edit your question to say which.

Andomar
  • 225,110
  • 44
  • 364
  • 390