Collections:
Sort the Query Output in Oracle
How To Sort the Query Output in Oracle?
✍: FYIcenter.com
If you want the returning rows to be sorted, you can specify a sorting expression in the ORDER BY clause. The following select statement returns rows sorted by the values in the "manager_id" column:
SQL> SELECT * FROM departments ORDER BY manager_id;
DEPARTMENT_ID DEPARTMENT_NAME MANAGER_ID LOCATION_ID
------------- -------------------- ---------- -----------
90 Executive 100 1700
60 IT 103 1400
100 Finance 108 1700
30 Purchasing 114 1700
50 Shipping 121 1500
80 Sales 145 2500
10 Administration 200 1700
20 Marketing 201 1800
......
⇒ Query Output Sorted by Multiple Columns in Oracle
⇐ Select Some Rows from a Table in Oracle
2019-12-19, 3253🔥, 0💬
Popular Posts:
How To Get the Definition of a View Out of the SQL Server in SQL Server? If you want get the definit...
How To Install Oracle Database 10g XE in Oracle? To install 10g universal edition, double click, Ora...
Where Is the Export Dump File Located in Oracle? If you are not specifying the dump directory and fi...
Can You Drop an Index Associated with a Unique or Primary Key Constraint in Oracle? You can not dele...
How To List All User Names in a Database in SQL Server? If you want to see a list of all user names ...