I have two queries I am trying to combine into one. A simplified version of what I am doing:
SELECT * FROM table WHERE `id` = '1' ORDER BY `name`
SELECT * FROM table WHERE `id` = '2' ORDER BY `age`
I have looked into unions but the examples I find online are less than helpful.
unionorunion all. Also which DBMS are you using?where id in (1,2).