Tags: Programming Language.
An ORDER BY clause in SQL specifies that a SQL SELECT statement returns a result set with the rows being sorted by the values of one or more columns. The sort criteria do not have to be included in the result set. The sort criteria can be expressions including – but not limited to – column names user-defined functions arithmetic operations or CASE expressions. The expressions are evaluated and the results are used for the sorting i.e.