- 1
- 2
- 3
- 4
SELECT s.id, ( SELECT russianName FROM table2 WHERE countryId=s.region1 ) AS name1,
( SELECT russianName FROM table2 WHERE countryId=s.region2 ) AS name2,
( SELECT russianName FROM table2 WHERE countryId=s.region3 ) AS name3
FROM table1 s LEFT JOIN table2 c WHERE s.countryId = xxx