MySQL Example | Select Order by with Multiple Columns

In this mysql query select statement, we will introduce how to order query results by multiple columns.

In mysql, we can order our data by:

SELECT * FROM [table-name] 
ORDER BY 
[column-name1 ] [ASC|DESC] ,  
[column-name2] [ASC|DESC],..

If we plan to order our query results by multiple columns, we can do as follows:

SELECT * FROM emp_salary ORDER BY age ASC, salary DESC

In this example, we will order our results by columns: age and salary.