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!

SQL Query Help

Achyut KOct 1 2010 — edited Oct 21 2010
Hi all,

I have one requirement in which I want the output of one column in ascending order and desc order in seprate columns.

For Examaple
select '1' as COL from dual
union all
select '2' from dual
union all
select '3' from dual
union all
select '4' from dual

Output  Should be
COL COL1
1      4
2      3
3      2
4      1
Regards,
Achyut
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 5 2010
Added on Oct 1 2010
9 comments
885 views