oracle sort | Sort sql | Sorting - oracle tutorial - sql tutorial



How to sort data using Oracle ORDER BY clause?

  • The Oracle ORDER BY clause is used to sort the data in ascending or descending order, based on one or more columns.
  • The ORDER BY keyword sorts the records in ascending order by default. To sort the records in descending order, use the DESC keyword.
Oracle sorting order by

Oracle sorting order by

Syntax:

SELECT column-list 
FROM table_name 
[WHERE condition] 
[ORDER BY column1, column2, .. columnN] [ASC | DESC];
click below button to copy the code. By - oracle tutorial - team

Example:

SELECT * FROM wikitechy_employee
ORDER BY NAME;
click below button to copy the code. By - oracle tutorial - team

Sample Database:

  • Consider the wikitechy_employee table having the following records:
 sorting oracle

Sorting:

 sorting in oracle
  • The above query would sort the result in ascending order by NAME.
  • Database sorts query results in ascending order by default.

Note: Similarly results can be sorted in descending order using DESC keyword.


This tutorial provides an indepth knowledge on the following items such as oracle tutorial , sql tutorial , sql , pl sql tutorial , oracle , pl sql , mysql tutorial , sql tutorial for beginners , learn sql , oracle database tutorial , sql query tutorial , oracle dba tutorial , plsql tutorial , oracle tutorial pdf , oracle pl sql tutorial , oracle sql tutorial , sql tutorial point , oracle tutorial for beginners , learn oracle online free , learn oracle online , learning pl sql programming , learn sql online for free , sql learning online , dba oracle tutorial , oracle sql tutorial advanced , oracle 11g dba tutorial with examples , oracle online learning , oracle learning online , how to learn pl sql , sql coding tutorial , sql learning websites , sql basic learning

Related Searches to oracle sort | Sort sql | Sorting