sql的ROW_NUMBER()函数分页

SELECT * FROM(SELECT  [Id]
      ,ROW_NUMBER() OVER(ORDER BY id) AS row_number
FROM [DeliveryDate]) AS a
WHERE row_number BETWEEN 1 AND 2

row_number()函数进行编号

 

posted @ 2020-07-31 15:11  世人皆萌  阅读(488)  评论(0编辑  收藏  举报