The order by clause is used to sort the data in ascending or descending order
Syntax:
1 2 3 |
SELECT column1, column2, column3, ... FROM table_name ORDER BY column1, column2, column3, ... ASC|DESC; |
example:
1 |
select * from cars here order by model asc |
output:

above example Cars table is sorted with model name column in ascending order using Order By clause