there are three tables country-> region-> city where in each subsequent there is the id of the previous one, to which it refers:
tbl.strana
id name 1 Албания 2 Уругвай 3 Вьетнам
tbl.region
id name countryid 1 Албанский регион 1 2 Уругвайский регион 2 3 Вьетнамский регион 3
tbl.gorod
id name regionid 1 Албанская столица 1 2 Уругвайская столица 2 3 Вьетнамская столица 3
Please tell me how in one request for a city Id to get the region and country id.
select t1.*,t2.*,t3.* from table1 t1 left join table2 t2 on t2.id = t1.id, left join table3 t3 on t3.id = t1.id
get all data from 3 tables with the same id - InDevXselect r.id, cn.id from city c left join region r on r.id = c.id, left join country cn on cn.id = c.id
something like this, it turns out - InDevX