This project is read-only.

ORDER BY

Specifies the sort order used on objects returned in a SELECT statement.
[ ORDER BY {order_by_expression [ ASC | DESC ] } [ ,…n ] ]

Arguments

orderbyexpression
Any valid query expression specifying a property on which to sort. Multiple sort expressions can be specified. The sequence of the sort expressions in the ORDER BY clause defines the organization of the sorted result set.
ASC
Specifies that the values in the specified property should be sorted in ascending order, from lowest value to highest value. This is the default.
DESC
Specifies that the values in the specified property should be sorted in descending order, from highest value to lowest value.

Examples
select e from Employees as e order by e.FirstName asc
Same as
select e from Employees as e order by e.FirstName
select e from Employees as e order by e.FirstName desc


Last edited Mar 9, 2013 at 8:41 AM by ansiboy, version 1

Comments

No comments yet.