Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> SQL statement to return a block of rows
List - In a SQL statement with an ORDER clause, can I provide a starting and
end point (or offset) based on rows returned? Oracle9i
We are converting a small application from SQL Server to Oracle (good!). In SQL Server they do everything with stored procedures, but in Oracle we plan to just use SQL statements. In SQL Server one stored procedure retrieves a screenfull of rows and returns them, so the cursor is managed on the database side. I said that for Oracle we would probably want to do this similarly with just SQL statements. This works except for the screenful business. I said we could wrap the query in a PL/SQL shell and use a cursor, but the team is thinking there must be a way. If someone has a PL/SQL template, please send it to me. One of them uses MySql and says this feature is available there.
Dennis Williams
DBA
Lifetouch, Inc.
"We all want progress, but if you're on the wrong road, progress means doing
an about-turn and walking back to the right road; in that case, the man who
turns back soonest is the most progressive."
-- C.S. Lewis
![]() |
![]() |