I have two different schemas in SQL Server (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 SQL Server 2005 databases. I want to do something like this:
select T1.Id
from S1.Table1 T1
, S2.Table2 T2
Where T1.Id = T2.refId