 inner join {bd}.{tabla} on {bd}.{tabla}.id={tabla2}.id_{tabla}