February 2014
Beginner
1248 pages
62h 25m
English
• A query’s result can be sorted with the ORDER BY clause (p. 1055). The simplest form of an ORDER BY clause is
SELECT columnName1, columnName2, ... FROM tableName ORDER BY column ASCSELECT columnName1, columnName2, ... FROM tableName ORDER BY column DESC
where ASC specifies ascending order, DESC specifies descending order and column specifies the column on which the sort is based. The default sorting order is ascending, so ASC is optional.
• Multiple columns can be used for ordering purposes with an ORDER BY clause of the form
ORDER BY column1 sortingOrder, column2 sortingOrder, ...
• The WHERE and ORDER BY clauses can be combined in one query. If used, ...
Read now
Unlock full access