What is best approach of joining 2 tables from different Database? In my situation, I have a development database that has postfix such as \_DEV while on the production has \_PROD.

The issue is that if I join these 2 tables I have to reference a full database name such as DB1\_DEV.dbo.table1 INNER JOIN DB2\_DEV.dbo.table100

Work well though but if you want to move this into production, it will be a nightmaire cause I have to change these.

Thanks