SQL2012的新分页方法

DECLARE @PageNumber INT = 6

DECLARE @RowsCountPerPage INT = 10

SELECT  BusinessEntityID ,

        FirstName ,

        LastName

FROM    Person.Person

ORDER BY BusinessEntityID

        OFFSET ( @PageNumber - 1 ) * @RowsCountPerPage ROWS

 FETCH NEXT @RowsCountPerPage ROWS ONLY

 

posted @ 2016-08-02 15:27  飘....  阅读(179)  评论(0编辑  收藏  举报