CREATE PROCEDURE PROC_FenYe @tableName varchar(50); @pageSize int; @currentPage intASSELECT 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