时间:2021-07-01 10:21:17 帮助过:2人阅读
Sql2005-2008分页稍微复杂一点:
CREATE PROCEDURE usp_paging @PageNumber INT=1, @PageSize INT=10 AS BEGIN WITH ctepaging AS (SELECT *, Row_number() OVER(ORDER BY 列名) AS rownum FROM 表名) SELECT * FROM ctepaging WHERE rownum BETWEEN ( @PageNumber - 1 ) * @PageSize + 1 AND @PageNumber * @PageSize END
Sql分页存储过程
标签: