Reputation: 21
I have these two queries and I have to merge them, can you help me?
select sledovanost.ID_D,tv_stanice.ID_STA,tv_stanice.NAZOV_STANICE
from sledovanost
left outer join tv_stanice
on (sledovanost.id_sta=tv_stanice.id_sta);
select divak.MENO
from sledovanost
left outer join divak
on (sledovanost.ID_D=divak.ID_D);
Upvotes: 0
Views: 40
Reputation: 1271023
Without understanding the underlying data structure and desired results, the most likely approach would be chaining the left join
s:
select s.ID_D, t.ID_STA, t.NAZOV_STANICE, d.MENO
from sledovanost s left outer join
tv_stanice t
on s.id_sta = t.id_sta left outer join
divak d
on s.ID_D = d.ID_D;
Upvotes: 1