Resources:
http://docs.oracle.com/database/122/SQLRF/ROWNUM-Pseudocolumn.htm#SQLRF00255
http://blog.csdn.net/u010395242/article/details/52047341
In the following manner:
SELECT * from(SELECTRow_.*, RowNum rownum_ from(SELECT * fromtable_nameWHERE 1 = 1 ORDER bytable_name.create_date) Row_WHERERowNum<= Ten) Table_aliasWHERETable_alias.rownum_> 0
In the paging query data, there is a phenomenon of duplication of data, through the data:
The reason for this problem is that in the data, the value of the row sequence is not unique, that is, the value of create_date is not unique.
In Oracle:
Oracle's paging query is no sort operation, and Oracle is sequentially reading the qualifying data from the data block back to the client.
While Oracle's sorting algorithm is not stable, that is, for data with key values equal, this algorithm does not guarantee the order in which the data of these key values are equal before the sorting is done.
The workaround is as follows (two conditions must be met at the same time):
A sort condition is required in a 1.sql statement.
2. Sorting criteria if there is no uniqueness, then you must follow a unique condition, such as a primary key, behind it.
Oracle paging query sorting data duplication problem