Skip to content
Advertisement

Need to perform ORDER by Twice

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

Advertisement

Answer

SELECT FIELD1, FIELD2 FROM TABLE ORDER BY FIELD1 ASC, FIELD2 ASC

A good tutorial on this SQL ORDER BY

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement