Re: equivalent to LIMIT?
Posted in 2003
Fernando Nunes — — source: Usenet: comp.databases.informix
Brian wrote: > Was wondering if there's an Informix equivalent to the LIMIT clause seen > in MySQL and PostgreSQL (and possibly others)? > Right now, if our devs need rows 400-450 in a 10,000 row table, they > SELECT TOP 450, but that just seems inefficient especially when you get > to returning 10k rows when you only need the last 50. I'm not sure if I understood... SLECT FIRST 450 * will return only 450 rows... If you need row 401 to 450 you'll have to fetch the 450 and discr the first 400. In some other DB I *think* you can have a pseudo-column in the result set and select on this. But all this discussion only makes sense if you know (or define) the order in which the rows are returned... Regards.