Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Order by clause

Eslam_ElbyalyJun 22 2014 — edited Jun 22 2014

hi ,

i want to know what does it mean when i use "order by " clause with more than one column in two cases (sorting order is the same and when sorting order is different)  , for example

what should happen when i do this

1- select * from table

order by 1 , 2  ; -- the two are asc ,

2- select * from table

order by 1 asc , 2 desc ;

in the two cases if it sorts column with the first column regardless it's asc or desc , it will control the other columns order , because it should get

the related data of the first column , then sorting another column does not do anything ?

am i wrong ?

thank you

This post has been answered by SomeoneElse on Jun 22 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 20 2014
Added on Jun 22 2014
12 comments
401 views