<order_by_clause> | ::= | ORDER BY <field_expr_list> [
ASC | DESC ] |
<field_expr_list> | ::= | <field_expr> [ , <field_expr>
... ] |
The ORDER BY clause specifies which SELECT clause field-expressions the query
output records should be sorted by.
ASC
Specifies that the field-expression list values should be sorted in ascending order, from lowest value to highest value. ASC is the default.DESC
Specifies that the field-expression list values should be sorted in descending order, from highest value to lowest value.
A. Sorting by a single field-expression
SELECT date, cs-uri-stem, cs-uri-query, sc-bytes FROM LogFiles\ex040528.log ORDER BY sc-bytes DESCB. Sorting by multiple field-expressions
SELECT date, cs-uri-stem, cs-uri-query, sc-bytes FROM LogFiles\ex040528.log ORDER BY date, sc-bytes
© 2004 Microsoft Corporation. All rights reserved.