Just send the list of columns separated by commas to ORDER BY:
SELECT * from table WHERE table.foo=bar ORDER BY colA, colB
The ORDER BY clause causes the output of a string to be sorted. The ORDER BY argument is a list of expressions that are used as the key for sorting. expressions should not be part of the result for a simple SELECT, but the SELECT element for each sort expression must exactly match one of the column results. Each view expression may be optional, then the COLLATE keyword and matching name function used to organize text and / or ASC or DESC keywords to indicate sorting order.
meder omuraliev Nov 09 '09 at 3:21 2009-11-09 03:21
source share