RE: How to select first 50 rows?
Posted in 2003
Pass the primary key around (perhaps save the last key received in a cookie)
then the query can be:
select first 50 prim_key, ....
from atable
where prim_key > ?
and ....
order by prim_key;
Or if you will be ordering by another set of columns then pass them around (if
those are not unique just tack the primary key following the order by columns.
Art S. Kagel
----- Original Message -----
From: Marius Erasmus <MErasmus@ejustice.pwv.gov.za>
At: 10/29 1:03
> Hi,
>
> I have done this before........
>
> Try this:
> SELECT FIRST 50 FROM <tablename>>
> Hope it helps.
>
> Marius.
>
> -----Original Message-----
> From: miyaki [mailto:lcib@yahoo.com]
> Sent: 29 October 2003 03:55 AM
> To: ids@iiug.org
> Subject: How to select first 50 rows? [2091]
>
> Hi guys,
>
> If i have a total 500 rows of records set, but i need
> to return 50 rows at one time by a sql statement. Do
> you know how to do that?
>
> Thanks in advance.
>
> Miyaki
>
> __________________________________
> Do you Yahoo!?
> Exclusive Video Premiere - Britney Spears
> http://launch.yahoo.com/promos/britneyspears/
sending to informix-list