Developing By Me

Project Development and Design

ORDER BY Clause

ORDER BY Clause

The ORDER BY clause is the last one in with the statement. ORDER BY is followed by a list of fields which will define how the rows will be sorted. The fields can be sorted in ascending ‘ASC’ or descending ‘DESC’ order. Each field can be sorted in either direction and each subsequent field can be sorted in either direction. The syntax might look like ‘ORDER BY field1 ASC, field2 DESC’ however if the sort direction is left off the field will be sorted as if ASC was defined.

%d bloggers like this: