Please note, this is a STATIC archive of website www.javatpoint.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
Javatpoint Logo
Javatpoint Logo

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:

Mariadb Order by clause 1

Example:

Output:

Mariadb Order by clause 2

ORDER BY Clause with DESC Attribute

Output:

Mariadb Order by clause 3

ORDER BY Clause with ASC Attribute

Output:

Mariadb Order by clause 4





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA