RE: Who supports the LIMIT clause in a SELECT statement
Posted in 1999
i try select * from table where rownum < 45
i got error, rownum is not a field of the table,
i try select first 1 from table from the isql, it works fine,
but it doesn't work in the 4gl, during compile, it gives syntax error
-----Original Message-----
From: cbusch@my-dejanews.com [mailto:cbusch@my-dejanews.com]
Sent: Wednesday, February 17, 1999 8:15 AM
To: informix-list@iiug.org
Subject: Re: Who supports the LIMIT clause in a SELECT statement
> Actually rownum will only be usable to get the first # of rows, not for,
say,
> the 15th to the 30th as requested in the original question....
>
> you could use
> select * from table where rownum < 45> minus
> select * from table where rownum < 30>
> and it will return rows 31 - 45 (won't it return 31 to 44?)
>
I don't use Oracle, but my company is considering it...
Why couldn't you do this:
select * from table where rownum between 31 and 44
or
select * from table where rownum >= 31 and rownum <= 44
--
CB
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own