Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to use 'Top' in oracle?
Hi,
If using Oracle 8.1.6, the function RANK can also help you. Here is the syntax for RANK
RANK and DENSE_RANK
RANK() OVER (
[PARTITION BY <value expression1> [, ...]]
ORDER BY <value expression2> [collate clause] [ASC|DESC]
[NULLS FIRST|NULLS LAST] [, ...]
)
DENSE_RANK() OVER (
[PARTITION BY <value expression1> [, ...]]
ORDER BY <value expression2> [collate clause] [ASC|DESC]
[NULLS FIRST|NULLS LAST] [, ...]
)
Ciao,
Basavaraj
mhwang wrote:
> I want to get the first 3 products order by these prices.
> But i get an error when using : "Select top 3 product_name from product
> order by product_price".
> How can i do it ?
>
> Any suggestions are appriciated.
> Ming at 9.25
Received on Tue Sep 26 2000 - 04:39:31 CDT
![]() |
![]() |