The ORDER BY clause helps you sort your results. You can sort your results in a few different ways, all of which will be covered in the following sections.
Using the ORDER BY clause
Learning how to use the ORDER BY clause to order query results
The ORDER BY clause is placed after FROM, as well as after WHERE, if you have a WHERE clause. You can order columns by ascending or descending order. Ascending is the default sort order, so you don't need to specify ascending explicitly.
Do not depend on the order of the rows in a result set, unless you have specified an ORDER BY clause. The order in which rows are returned may or may not be the same without an ORDER BY explicitly defined in your query.
To sort the columns...