Girl at breakfast

Friday, June 8, 2012 |

Girl at breakfast by Terre d’Espoir in Goa – India




















ROWNUM is a pseudo-column that returns a row's position in a result set. 
ROWNUM is evaluated AFTER records are selected from the database and BEFORE the execution of ORDER BY clause.
The following type of queries will ALWAYS return NO DATA:

... WHERE ROWNUM > x
... WHERE ROWNUM BETWEEN x AND y
... WHERE ROWNUM IN (x, y, z, ...)

However, this will work:
... WHERE ROWNUM < x

SELECT EMPNAME FROM 
   (SELECT EMPNAME, ROWNUM R FROM employees)
   WHERE R BETWEEN 51 and 100;

Thus, if you want the next 10 results,
However, this will work:
select from (select t.*, ROWNUM from table t) where between 10and 120;
We’ve found this post http://forums.oracle.com/forums/thread.jspa?threadID=415724