Offset and limit in SQL server?

Jonathan Brotto 1,076 Reputation points
2022-01-25T16:49:15.987+00:00

Does SQL server support limit and offset?

Developer technologies Transact-SQL
SQL Server Other
{count} votes

Accepted answer
  1. LiHong-MSFT 10,056 Reputation points
    2022-01-26T03:37:58.267+00:00

    Hi,@Jonathan Brotto
    We don't support 'limit' word in SQL sever.However we can use OFFSET and FETCH to limit the rows.
    Please refer to this doc,which I have provided in your previous thread SELECT bottom SQL.

    Best regards,
    LiHong


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


3 additional answers

Sort by: Most helpful
  1. Viorel 122.5K Reputation points
    2022-01-25T16:52:02.647+00:00

  2. Tom Phillips 17,771 Reputation points
    2022-01-25T17:18:49.417+00:00
    0 comments No comments

  3. Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
    2022-01-25T22:36:05.943+00:00

    See this old thread of yours: https://learn.microsoft.com/en-us/answers/questions/699967/select-bottom-sql.html where I gave you an example of exactly this.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.