Given two subquery tables t1 and t2, how can I return t2 if and only if t1 returned empty rows?
Edit: Added example
T1
SELECT *
FROM common_table
WHERE language_id = 1
T2
SELECT *
FROM common_table
WHERE language_id = 2
Basically what I am doing is that in case the T1 return empty rows, I would like it to execute T2 and return those rows. Now, I am fully aware that I can do this in PHP but the query is a subquery and I would rather let SQL (not PHP) code handle it.
In MSSQL I can do something like
Should be the same in mySQL or similar