Forum OpenACS Q&A: Response to SQL tip: Find NEXT in Result

Collapse
Posted by Don Baccus on
select id, name
from your_table
order by id
limit 1 offest :current_offset
where "current_offset" is a Tcl variable containing the number of the row you're interested in.

It's a bit more complicated in Oracle but since you said you're using PG I won't bother with an example.