>and to get rows, say, from 20 to 40?
>Is it ok to write:
>"select * from (select * from table where foocondition order by foo) where
>rownum >= 20 AND rownum <= 40"
its not that easy, as oracle start counting with the first retrieved row, so
rownum > x will wait for ever, as oracle will never start counting because
no
rows are retrieved.
make a trick and select the rownum in a subquery, than you can treat it as a
fixed row:
select * from (
select rownum "rn", * from (select * from table where foocondition order by
foo)
)
where rn >= 20 AND rn <= 40
this should do it (although there are a lot of subqueries)
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]