I have two selects:
SELECT id FROM a -- returns 1,4,2,3 UNION SELECT id FROM b -- returns 2,1
I\'m receiving correct num of rows, like:
@Adrian's answer is perfectly suitable, I just wanted to share another way of achieving the same result:
select nvl(a.id, b.id) from a full outer join b on a.id = b.id order by b.id;