86
MariaDB ORDER BY Clause
In MariaDB database, ORDER BY Clause is used to sort the records in your result set in ascending or descending order.
Syntax:
Note: You can sort the result without using ASC/DESC attribute. Bydefault the result will be sorted in ascending order.
ORDER BY Clause without using ASC/DESC attributes
Use the “Employees” table, having the following data:
Example:
Output:
ORDER BY Clause with DESC Attribute
Output:
ORDER BY Clause with ASC Attribute
Output:
Next TopicMariaDB Distinct Clause