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:
Can the Query Output Be Sorted by Multiple Columns
Can the Query Output Be Sorted by Multiple Columns? - Oracle DBA FAQ - Understanding SQL SELECT Query Statements
✍: FYIcenter.com
You can specifying multiple columns in the ORDER BY clause as shown in the following example statement, which returns employees' salaries sorted by department and salary value:
SQL> SELECT department_id, first_name, last_name, salary FROM employees ORDER BY department_id, salary; DEPARTMENT_ID FIRST_NAME LAST_NAME SALARY ------------- --------------- --------------- ---------- 10 Jennifer Whalen 4400 20 Pat Fay 6000 20 Michael Hartstein 13000 30 Karen Colmenares 2500 30 Guy Himuro 2600 30 Sigal Tobias 2800 30 Shelli Baida 2900 30 Alexander Khoo 3100 30 Den Raphaely 11000 40 Susan Mavris 6500 50 TJ Olson 2100 ......
2007-04-20, 5138👍, 0💬
Popular Posts:
How To Use SELECT Statement to Count the Number of Rows? - Oracle DBA FAQ - Understanding SQL SELECT...
Rachel opened her math book and found that the sum of the facing pages was 245. What pages did she o...
What will happen in these three cases? if (a=0) { //somecode } if (a==0) { //do something } if (a===...
What does static variable mean? There are 3 main uses for static variables: If you declare within a ...
What’ is the sequence in which ASP.NET events are processed ? Following is the sequence in which the...