C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
SQL ORDER BY CLAUSE WITH ASCENDING ORDERThis statement is used to sort data in ascending order. If you miss the ASC attribute, SQL ORDER BY query takes ascending order by default. Let's take an example of supplier SELECT supplier_city FROM suppliers WHERE supplier_name = 'IBM' ORDER BY supplier_city; Let us take a CUSTOMERS table having the following records:
This is an example to sort the result in ascending order by NAME and SALARY. SELECT * FROM CUSTOMERS ORDER BY NAME, SALARY; This would produce the following result.
|