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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

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

Processing
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
852 views