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 NULLS LAST on multiple column

S-MaxFeb 17 2014 — edited Feb 18 2014

Hi all,

In my 11R2 database I have a table with many rows. After SELECT * on the table I get the following output:

                            

IDCOL1COL2COL3
1111112222233333
222223
31111233334
411113
51111433335

With "ORDER BY ... NULLS LAST" I can order the values in the first, second, or ... column and the null rows will be shown at the end of the column. I would like to get the following output:

                       

IDCOL1COL2COL3
1111112222233333
2111122222333334
31111333335
411114

Is it possible to get this using SQL commandos?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 18 2014
Added on Feb 17 2014
9 comments
1,743 views