Explain ORDER BY in SQL.

The ORDER BY clause is used to sort the result set of a query based on one or more columns. You can specify each column’s sorting order (ascending or descending). For example:

SELECT * FROM products ORDER BY price DESC;


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *