SELECT * FROM (
SELECT ROW_NUMBER() OVER(ORDER BY ID ASC) RowNum, * FROM Test_Tabel ) OrderData
WHERE RowNum BETWEEN @iRowCount*(@iPageNo-1)+1 and @iRowCount*@iPageNo
百万级数据查询分页
最新推荐文章于 2024-04-08 10:22:43 发布
SELECT * FROM (
SELECT ROW_NUMBER() OVER(ORDER BY ID ASC) RowNum, * FROM Test_Tabel ) OrderData
WHERE RowNum BETWEEN @iRowCount*(@iPageNo-1)+1 and @iRowCount*@iPageNo