http://www.cnblogs.com/aito/archive/2010/08/27/1810494.html
select top
m *
from
UserInfo
where
UserId
not
in
(
select
top
(n-1)*m UserID
from
UserInfo
order
by
UserID
asc
)
order
by
UserID
asc
如果记录集合有100万条 not in集合可能会会很慢
.... id not in(1,2,3,4,5,.....,1000000)....
.... id not in(1,2,3,4,5,.....,1000000)....
SQLITE的分页查询:limit n,m; 从第n条往后查m条:
SELECT * FROM [sft_task] ORDER BY Id ASC limit n,m;