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: Restricting result set to first 10 of 100 without cursor

Re: Restricting result set to first 10 of 100 without cursor

From: Anatoly Moskovsky <avm_at_trais.com.ua>
Date: 2000/05/02
Message-ID: <HVN957015BF6@heaven.org>#1/1

Hi!

"Green Spawn" <greenspawn_at_hotmail.com> wrote in message news:390ee66c.7565200_at_news.supernews.com...
> Use rownum
>
> select * from customers
> where rownum < 101
>

This will return first 100 unsorted rows.

You should use oracle hints:
select /*+ index_asc(customers ind_sort_index)*/ * from customers
where rownum < 101;

ind_sort_index - is an index on the sort columns of the customers

Bye Received on Tue May 02 2000 - 00:00:00 CDT

Original text of this message

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