Solutions for querying paging data using SQL Server SQL statements. For example, you must select the 3,000th-page records in tbllendlist, with 100 records on each page. ---------- Method 1: ---------- selecttop100 * fromtbllendlistwherefldserialNonotin.
----------
Method 1:
----------
Select top 100 * from tbllendlist
Where fldserialNo not in
(
Select top 300100 fldserialNo from tbllendlist
Order by fldserialNo
)
Order by fldserialNo
----------
Method 2:
----------
Select top 100 *
FROM tbllendlist
WHERE (fldserialNo>
(Select max (fldserialNo)
FROM (select top 300100 fldserialNo
FROM tbllendlist
Order by fldserialNo) as t ))
Order by fldserialNo
Method 1: fast execution speed!
However, this practice is still very troublesome. We strongly expect Microsoft to invent a new paging SQL statement !!!!
Tbllendlist contains 3,000th million records per page. ---------- Method 1: ---------- select top 100 * from tbllendlist where fldserialNo not in (se...