The ORDER BY option allows selecting the order of the returned results. It takes as argument a list of column names, along with the order for the column (ASC for ascendant and DESC for descendant, omitting the order being equivalent to ASC). Currently, the possible orderings are limited (which depends on the table CLUSTERING ORDER):
- If the table has been defined without any specific CLUSTERING ORDER, then allowed orderings are the order induced by the clustering key and the reverse of that one
- Otherwise, the orderings allowed are the order of the CLUSTERING ORDER option and the reversed one