I've two databases. Considere DB1 and DB2. For list of common tables I would like to perform below activity:
If the PrimaryKey values is different I would like to know the tables. Say for example the tEmployee table in DB1 and DB2. In DB1 the EmpID is having value as 1, 2..... n. But in DB2 the EmpID values as 100001, 100002.... 10000n. Then in result of my query I would like to get tEmployee and such kind of other tables. How to write query for it?
Please note that both DB1 and DB2 are in same server. Please assist.