***************************************************************************************************************************
sqlserver (top not in 关键字)
startIndex= pageSize*(pageNumber-1)//起始行
select top pageSize * from 表名 where id not in (select topstartIndex id from 表名 order by id) order by id
页数从0开始
SELECT TOP 页大小 *
FROM TestTable
WHERE ID NOT IN
(SELECT TOP 页大小*页数 id FROM 表 ORDER BY id)
ORDER BY ID
mysql(limit()函数)
startIndex= pageSize*(pageNumber-1) //起始行
select * from 表名 limitstartIndex, pageSize;
oracle (rownum >=关键字)
startIndex= pageSize*(pageNumber-1)+1
endIndex=startIndex+pageSize
select a.* from
(
select rownum num ,t.* from 表名 t order by id asc
)a
where a.num>=startIndex and a.num<endIndex