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

Home -> Community -> Usenet -> c.d.o.tools -> Re: getting subsets of results

Re: getting subsets of results

From: <Haniff_at_cyberdude.com>
Date: Thu, 16 Nov 2000 23:37:26 GMT
Message-ID: <8v1r3l$9ca$1@nnrp1.deja.com>

In article <8urvat$cq2$1_at_nnrp1.deja.com>,   tommychill_at_my-deja.com wrote:
> I need to return a subset of rows from a table but I have a twist.
>
> Say I have 100 rows. I want to show them 10 at a time.
>
> I can use ROWNUM to show the first 10 rows, but does anyone have a
 good
> way of showing the next 10 (11 - 20)?
>
> You can't use ROWNUM with a greater than operator bc it always
 returns
> false.
>
> Please help...
>
> thanx...
>
> t
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

select * from (

   select rownum table_row, a.* from mytable a )
where table_row > 10

Note: The inner query fixes the rownum in stone. HTH

Neef

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Nov 16 2000 - 17:37:26 CST

Original text of this message

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