RowNum principle:
1 Oracle executes your query.
Perform a query operation
2 Oracle fetches the first row and calls it row number 1.
Place row num on the first row at 1
3 have we gotten past row number meets the criteria? If no, then Oracle discards the row, if yes, then Oracle return the row.
The resulting row's row num is compared to the condition and if it does not match, the row is discarded, and if it matches, the row is returned
4 Oracle fetches the next row and advances the row number (to 2, and then to 3, and then to 4, and so forth).
Oracle gets the next line, and then increases the rownum by 1
5 Go to step 3.
Return to step 3rd
From this principle it is known that theselect Rownum,name from emp where rownum>5; does not return rows because the query is executed first by the select name from EMP, and the 1th row of rownum is labeled 1, Then look at the where condition, false, then discard the row, execute line 2nd, or rownum labeled 1, see where condition is also false, so forever is false,rownum do not change, all rows are discarded, so there is no result.
where rownum = N (n>1)
where rownum > N are not available, which is the reason above
Oracle:rownum principle