Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Rownum function with order by statement
Prior releases to 8.1 do support the 'group by' syntax. Mind you this is a hack that works due to the manner in which the group by function operates, and will also only work in ascending order. Try:
select rownum, a_order
from ( select a a_order
from sometable group by a);
Jay!!!
Harlin Setiadarma wrote:
> Hi,
> can anybody help me ?
>
> I want to :
> select rownum, a
> from sometable
> order by a
>
> where a :
>
> 5
> 3
> 6
> 2
>
> The result I expected is :
> 1 2
> 2 3
> 3 5
> 4 6
>
> Thanks in advance....
Received on Tue Sep 14 1999 - 11:57:37 CDT
![]() |
![]() |