WHERE RowNum BETWEEN (@PageNumber
-
实现sql分页的存储过程代码是什么
``sql,CREATE PROCEDURE 分页查询, @PageSize INT,, @PageIndex INT,, AS,BEGIN, SELECT * FROM (, SELECT ROW_NUMBER() OVER (ORDER BY ID) AS RowNum, * FROM 数据表, ) AS TempTable, WHERE RowNum BETWEEN ((@PageIndex - 1) * @PageSize + 1) AND (@PageIndex * @PageSize);,END;,``