Sorting Data by Column Value

Sorting the data retrieved by a query can make it much easier to understand the data displayed. SQL sorts data based on the values of selected columns. All the data in the table is sorted based on the values of the first sort column. Within that sort, the data is sorted based on the values of the second sort column and so on.

You can sort the column values in both ascending and descending order. Ascending is the default. Ascending means that numeric data is sorted from lowest-to-highest and character data is sorted from A-to-Z. Descending means the numeric data is sorted from highest-to-lowest value and character data is sorted from Z-to-A.

NOTE: This option is available only when creating an SQL Select statement.

 

See Also

How Do I...