The use of rownum
Select Rownum,empno,ename,job from emp where rownum<6
You can get value data that is less than 6
Select Rownum,empno,ename,job from emp where rownum>6 and rownum<10
No data reason: Oracle first produces a number of 1 data, that is, the condition is not satisfied, then the same will continue to produce the second data is also numbered 1, so the final data is not
Solution: You can turn the Select Rownum,empno,ename,job from emp into a subquery
The use of ROWID can be repeated data
Unlike the rownum pseudo-column, he is a physical presence, ROWID is a data type, based on 64-bit encoded 18 characters to uniquely flag a record of the physical location of a id,rowid can be queried in the table, but its value is not stored in the table, so do not support additions and deletions to change the operation
For example, there are two identical data
Delete from TableName where rowID not in (select min (rowid) from TableName Group By column name
The use and difference of Oracle's pseudo-column rownum and ROWID