Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Sort the Query Output
How To Sort the Query Output? - Oracle DBA FAQ - Understanding SQL SELECT Query Statements
✍: 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
......
2007-04-20, 5375👍, 0💬
Popular Posts:
Does it matter in what order catch statements for FileNotFoundException and IOExceptipon are written...
If we have multiple AFTER Triggers on table how can we define the sequence of the triggers ? If a ta...
What print out will the folloging code produce? main() { char *p1=“name”; char *p2; p2=(char*)malloc...
What are the five levels in CMMI? There are five levels of the CMM. According to the SEI, Level 1 – ...
How do you override a defined macro? You can use the #undef preprocessor directive to undefine (over...