Sort each column individually
720806Sep 3 2009 — edited Sep 6 2009Hi,
Need to orderby two separate columns in ascending.
Actually am populating values to an excel sheet from oracle which requires two specific columns to be sorted individually.
select * from abc
order by col1, col2;
Actually the output of the above query will be
col1 col2
1 5
2 6
3 1
4 2
but I want as shown below.
col1 col2
1 1
2 2
3 5
4 6
I need to bring in Oracle the similar feature we have in excel under 'Data' -> 'Sort' -> col1 then by -> col2.
Could anybody suggest me the best way .. Appreciate your response
Thanks