tags:

views:

47

answers:

1

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

+2  A: 

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
similar for oracle
Randy