How do you sort data in ascending order?
To sort data in ascending order, use the ORDER BY operator with the ASC (ascending) parameter.
Syntax
sql
SELECT *
FROM table_name
ORDER BY column_name ASC;Example
sql
SELECT name, salary
FROM employees
ORDER BY salary ASC;Rows come out from the smallest salary to the largest.
Important:
ASC can be omitted, since ascending order is used by default.
Short Answer
Interview readyPremium
A concise answer to help you respond confidently on this topic during an interview.