The scenario:
A large table with millions of rows.
SELECT * FROM UserData order by id
The result set looks something like this
+---------+----------+----------+
| id | username | password |
+---------+----------+----------+
| 1 | bsmith19 | 123456789|
+---------+----------+----------+
| 2 | bqmith12 | 123456789|
+---------+----------+----------+
| 3 | bsmith13 | 123456789|
+---------+----------+----------+
| 4 | bsmith14 | 123456789|
+---------+----------+----------+
| 5 | bsmith15 | 123456789|
+---------+----------+----------+
| 6 | bsmith16 | 123456789|
+---------+----------+----------+
| 7 | bsmith17 | 123456789|
+---------+----------+----------+
| ... | ... |skip ahead|
+---------+----------+----------+
| 1000000| bsmith17 | 123456789|
+---------+----------+----------+
I can add 'where id > 4' to any database and it will start at record 5.
Just about every database has a 'set rowcount' (or similar) function that will limit the number of rows returned. This is a popular way for going through large record sets in the database.
But if I do this:
SELECT * FROM UserData order by username
I will not get back a result set that has a column that is guaranteed to have a proper ascending numeric order.
In mySQL that isn't a problem. I can always use limit to pull records from the middle of a result set.
SELECT * FROM UserData order by username
limit 50,5
This will get me rows 50,51,52,53,54 from the result set.
Now the real question:
How do you do this in Oracle?
Thanks in advance for your time.
-- Arvrom