du skal kalde tabellen i den anden database:
select a.id
, b.foreign_id
from database1.table1 a
join database2.table1 b
on b.foreign_id = a.id
du skal kalde tabellen i den anden database:
select a.id
, b.foreign_id
from database1.table1 a
join database2.table1 b
on b.foreign_id = a.id