分页存储过程
CREATE PROCEDURE PROC_FenYe
@tableName varchar(50);
@pageSize int;
@currentPage int
AS
SELECT TOP @pageSize * FROM @tableName
WHERE
CR_Id NOT IN
(SELECT TOP (@pageSize*(@currentPage-1)) CR_Id FROM @tableName ORDER BY CR_Id)
ORDER BY CR_Id
记忆力下降,日常日志