On Thu, May 04, 2006 at 11:12:12PM -0400, Matt Good wrote:
> > Indeed Oracle has a ROWNUM pseudo-column but it doesn't work in the
> > same way as OFFSET/LIMIT. ROWNUM is only useful after a query has
> > returned rows so you can't, for instance, say 'give me rows 100-199
> > from the is query'. If you try something like that you'll get a NULL
> > result set.
> 
> Unfortunately ROWNUM is not the same since it it calculated before the
> results are ordered.  Doing LIMIT and OFFSET is doable, but messy:
> 
> select col1, col2 from 
> (select col1, col2, rownum rnum from
>  (select col1, col2 from CLAIM_STATUS order by col1))
> where rnum between :offset + 1 and :limit + :offset

   With all its stupidities and complexities it's no wonder Oracle is
feeling heat from Postgres and MySQL. (-:

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
           Programmers don't die, they just GOSUB without RETURN.


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to