Article From:https://www.cnblogs.com/beast-king/p/9123087.html
SELECT
      TOP PageSize *
 FROM
     (
        SELECT
             ROW_NUMBER () OVER (ORDER BY id ASC) RowNumber ,*
        FROM
             student
     ) A
 WHERE     A.RowNumber > (PageNo - 1) * PageSize

 

Similar Posts:

Link of this Article: T-SQL— paging statement

Leave a Reply

Your email address will not be published. Required fields are marked *