order

SQL ORDER BY Clause

SQL ORDER BY Clause

The ORDER BY clause is used to sort the result set in either ascending or descending order.

Example of ORDER BY

SELECT first_name, last_name, salary
FROM Employees
ORDER BY salary DESC;
    

This query retrieves employees sorted by their salary in descending order.

ml>