It is necessary to fulfill the ORDER twice

I want to sort according to the date first, and then if the date is similar, then according to id .. How to do this in an Informix / HSQL query?

+5
source share
5 answers
SELECT FIELD1, FIELD2 FROM TABLE ORDER BY FIELD1 ASC, FIELD2 ASC

Good tutorial on this SQL ORDER BY

+13
source

Try this (according to your needs):

SELECT * FROM table ORDER BY datecol ASC, id ASC
+3
source

This should work:

SELECT * FROM Table
ORDER BY date, id;
+3
source

whether

[rest of query] order by date, id

Job?

+2
source

select * from (select * from the list of tabs by col1) order by col2

0
source

All Articles