docs.roxen.comBack to normal mode
DocsRoxenWebServer 4.5TutorialsDatabase Tutorial
Copyright © 2012, Roxen Internet Software
Suggestions, comments & compliments
manuals@roxen.com

Sorting

Data in a result is in undefined order. To have it sorted to some other order, the ORDER BY clause can be used. It modifies the basic query syntax:


SELECT <columns> FROM <table> [, <table> ...] WHERE <condition> 
       ORDER BY <column name> [DESC] [, <column name> [DESC] ...]

This will sort the returned rows according to the specified columns, depending on the column type (numerically if the column type is numeric, syntactically if the column type is textual, etc.) If the DESC modifier is specified, the rows will be sorted in reverse (descending) order.