Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: ROWNUM problem...
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
![]() |
![]() |