Sorting data with ORDER BY
Sorting data with ORDER BY
• The order by clause is the mechanism for sorting your result set using either raw column data or expressions based on column data.
• The ORDER BY keyword is used to sort the result-set in ascending or
descending order.
SELECT column1, column2, . . .
FROM table_name
ORDER BY column1, column2, . . . ASC|DESC;
EXAMPLE:
SELECT * FROM SALES ORDER BY SaleDate ;