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: ROWNUM problem...

Re: ROWNUM problem...

From: TurkBear <johng_at_mm.com>
Date: Mon, 04 May 1998 17:03:08 GMT
Message-ID: <354df3df.11804303@news2.mm.com>


A previous reply had a way to do it,
in case you missed it it involves using the 'minus' operator:

select * from table where rownum < 20.... minus
select * from table where <= 10

This will return rownums 11-20

Hope it helps,
John Greco
Oracle DBA

PS
The 'minus','intersect' and 'union' operators are underused and can be very powerful for 'odd' queries that might otherwise require PL/SQL to get the result you want.

"Hans Duijn" <hans_duijn_at_inventive.nl> wrote:

>...you can use a view to do this, try the following:
>
>create view vwtest as select rownum the_rownum,name from yourcolumn
>
>...now you can make a 'subselection' with the query:
>
>select * from vwtest where the_rownum between 10 and 20
>
>However, now you probably will run into problems when you want to retrieve a
>sorted selection.
>
>Succes anyway
>
>
Received on Mon May 04 1998 - 12:03:08 CDT

Original text of this message

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