Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Does Oracle allow configuring - number of records returned?
"Patel" <catusr_at_rediffmail.com> wrote in message
news:faf83404.0405141022.3a17e82f_at_posting.google.com...
> Does Oracle allow configuring - number of records returned by a query?
> Is there a default limit?
Just fetch the number of rows you want. This isn't Sybase or similar where you get all the results and use a client side cursor to navigate them. In Oracle you have a server side cursor and just fetch to your client however many records you want. (singly or in batches, fetch 1, fetch 1, fetch 100, fetch 100 via the array interface)
There are ways to limit the query to just give you 10 rows of how ever large a result set it would be without that limitation. You would use rownum<11. However, rownum is a calculated field that refers to the result set BEFORE any sorting or ordering is applied. Thus do not expect select ... from ... where ... rownum<11 order by ... to give you the results you expect. You have to do a little dance to fix that. good site is asktom.oracle.com Jim Received on Fri May 14 2004 - 20:19:15 CDT