A really quick question ... I have 4 tables that are UNIONlike this:
SELECT * FROM table1
UNION
SELECT * FROM table2
UNION
SELECT * FROM table3
UNION
SELECT * FROM table4
Without an indication, ORDER BYqueries are ordered by the first column in ascending order in alphabetical order (which in my case is a type varchar). I do not want to ORDER BY [Column1] DESC.
I just want to order the results in the same order as the UNION-ed tables themselves . 1, 2, 3, 4.
Is there an easy way to do this?
Thank!!
source
share