Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Use of ROWNUM?

Re: Use of ROWNUM?

From: Martin Dachselt <dachselt_at_firstgate.de>
Date: 31 Jul 2003 11:02:38 -0700
Message-ID: <bdafd998.0307311002.2006cfec@posting.google.com>


ramon_at_conexus.net (Ramon F Herrera) wrote in message news:<c9bc36ff.0307220911.1f2c0361_at_posting.google.com>...
>
> SELECT somefield FROM mytable WHERE ROWNUM = 100;
>

Hi,

you can use:

select * from
(select a,b,c,ROW_NUMBER()
OVER (ORDER BY xx) as rownumber
from mytable where [your where-clauses]) where rownumber=100;

xx is the column that is used to compute the rownumber. Sould be indexed for large tables.

Martin Received on Thu Jul 31 2003 - 13:02:38 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US