I have this query:
SELECT * from t1 WHERE child_id IN (SELECT child_id from t2 WHERE parent_id='1234') OR parent_id='1234'
Is it possible to do something like this:
SELECT * from t1 WHERE child_id IN ( (SELECT child_id from t2 WHERE parent_id='1234') UNION '5678' )
The UNION
keyword gives an error message, and I tried to do a google search, but it's hard to find something while searching for "Mysql concat IN"
Hope my question is clear.
source share