Forum OpenACS Q&A: Response to Porting Oracle's ROWNUM

Collapse
Posted by Don Baccus on
What do you want to use it for?  In web/db, most folks talk about using it to select n rows starting with an offset, which can be done easily in postgres using "limit" and "offset:

select * from foo limit 10 offset 30;

returns 10 rows starting with the 30th.

There's no PG function or variable that corresponds with ROWNUM, so if you're trying to do something other than the above, describe the problem and I'll try to help out.