Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SELECT second 25 records
Hi Maiko,
Sorry but SELECT * FROM <table> WHERE ROWNUM BETWEEN <n> AND <n1> doesn't work when <n> is greater than one. What will work, but is slow is:
SQL> l
1 select seq from jhgsw55 where rownum between 1 and 10
2 minus
3* select seq from jhgsw55 where rownum between 1 and 5
SQL> /
SEQ
6 7 8 9 10
SQL> Note I just happen to have a table laying around with a sequential number as the primary key.
regards
Jerry Gitomer
Maiko wrote in message <37a7ed7e.9362973_at_news.cistron.nl>...
>select naam from (
>select rownum a,naam from ckv_themas)
>where a between 1 and 25
>/
>
>did this for me on the first 25,
>
>just replace
>where a between 1 and 25 with values 26 and 50 or something
>
>On Tue, 3 Aug 1999 16:01:09 -0500, "Khal" <elsawi_at_xsimple.com>
wrote:
>
>>I'm looking for a way to select the second group of 25 matches
in a select
>>statement.
>>
>>Any Ideas?
>>
>>Khal
>>
>
Received on Wed Aug 04 1999 - 08:23:38 CDT