SQL分页

一:(利用NOT IN 和 SELECT TOP 分页)

 select top 10 *

from TestTable

where (ID not in

(select top 20 id

from TestTable

order by id))

order by ID

select top 页大小 *

where (ID not in

(select top 页大小*页数 id

from TestTable

order by id))

order by ID

原文地址:https://www.cnblogs.com/tyrant2012/p/2770506.html