Equivalent of LIMIT and OFFSET for SQL Server?

前端 未结 16 2186
天命终不由人
天命终不由人 2020-11-22 06:07

In PostgreSQL there is the Limit and Offset keywords which will allow very easy pagination of result sets.

What is the equivalent syntax f

16条回答
  •  庸人自扰
    2020-11-22 06:45

    select top (@TakeCount) * --FETCH NEXT
    from(
        Select  ROW_NUMBER() OVER (order by StartDate) AS rowid,*
        From YourTable
    )A
    where Rowid>@SkipCount --OFFSET
    

提交回复
热议问题