Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: limiting number of rows returned in sql query
Hi
select * from emp where ROWNUM<500
this should give u 500 records. But plz do check out the query in full before trying out. ROWNUM is a special colum/function / variable (dont know what) which acts as a counter for each row that is fetched by your query.
If this thing does not work, plz do tell me or if you find out a better way then also let me know. It would increase my knowledge also.
Regards
Harpreet
"bvh" <bvh2_at_swbell.net> wrote in message
news:3d12fc4b.117682588_at_news.supernews.com...
> Is there a way to limit the number of rows returned in a query?
>
> For example, I have a system that has 2,000 records in it. I want to
> pull those records in a batch process 500 at a time with software that
> will do scheduled sql queries -- I just need to figure out how to
> limit the record numbers returned without changing the design to the
> database (its a third party app's database).
>
> Thanks!
Received on Sat Jun 22 2002 - 10:32:17 CDT