I will watch the post of the seniors, all due to the fact that the database's SQL is large, and the SQL Server, Access, etc. has no secondary column such as RowID, _n_, OBS, etc., and the air BetWeen operator is not used, and it is not as good as Data sets such as Except, it is really a lot of heroes.
Even the database SQL, drawing the database with the SQL syntax of the previous N-recorded SQL syntax, such as the syntax, the data page n ****, and the key problem with the data paging is to take the N records. The syntax is deeply thoughtful, and finally Pefeve, this is a lot of guidance.
Take the Dafa of N-record after the record collection: Assumption: 1. A SQL statement will generate 1000 records (SELECT unique ID, other fields of FROM table set where conditions ORDER BY sort) 2. 20 records per page 3. Current display Page 5 is implemented as follows: Select * from (SELECT * FROM (SELECT * 4 Unique ID, other fields of the FROM table set Where conditions Order by Sort) AS A Union All Select * from (SELECT TOP 20 * 5 Unique ID, other FROM Table Set WHERE Condition ORDER BY Sorting) AS B) A Group By Unique ID, Other Fields Having Count = 1 Order By Sort by Run this SQL, to this retrieval set N record Dafa is more detailed : This SQL statement key application technique is that the Condition filter statement on the Union All and the group can make a universal paging method according to this skill, such as directly from the user to SQLSTR (SQL statement), NumperPage (display per page Number, currpage (current page), I have a SQL page statement noticed in the reproduction of the function: The current page is 1, no need to run the SQL, directly TOP is OK, because there is no environment, the SQL performance Unable to test, but I believe that it will not be inefficient to run the platform in Access, SQLServer can run, and other database platforms can only be run on the spot.