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: Limiting number of returning rows

Re: Limiting number of returning rows

From: <jejurkar_at_my-dejanews.com>
Date: Fri, 24 Jul 1998 15:37:16 GMT
Message-ID: <6pa9nc$vv7$1@nnrp1.dejanews.com>


In article <6p4s77$j0p$1_at_nnrp1.dejanews.com>,   john2335_at_my-dejanews.com wrote:
> Is there a syntax in oracle to limit number of returning rows
> in a single SQL call?
> I know you can do it in Sybase using: set row NUMBER_OF_ROW
>
> Tanks
>
>

You can say :

select c1, c2, ...
from t1,t2....
where ..... and

      rownum <= num_of_rows_desired

However, rownum is determined/assigned before rows are sorted by the 'order by' clause. So this may not work properly when using 'order by'.

HTH,
Sameer

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Fri Jul 24 1998 - 10:37:16 CDT

Original text of this message

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