Query two tables from different schema
- by Guru
Hi-
I have two different schemas in Oracle (say S1, S2). And two tables in those schemas(say S1.Table1, S2.Table2). I want to query these two tables from schema S1.
Both S1 and S2 are in different databases. From DB1 - Schema S1, I want to do something like this,
select T1.Id
from S1.Table1 T1
, S2.Table2 T2
Where T1.Id = T2.refId
I know one way of doing this would be creating a DB Link for the second schema and use it in querying. But sadly, I don't have priv to create DB link. Is there some way to do without DB link, like, in TOAD, you can compare two schema objects. But again, two schema objects and it is general comparision. Not like querying them.
Any ideas, suggestions are greatly appriciated. Thanks in advance.