Usually
join statement[
^] is used in such of situations.
Select t1.custID, t2.TempCustId
From [dbo1].Table1 AS t1 INNER JOIN [dbo2].Table1 AS t2 ON t1.CustId = t2.TempCustId
Above query returns recordset where
CustId
field is equal to
TempCustId
field. For further information, please see:
Visual Representation of SQL Joins[
^]