Share via

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
Developer technologies | Transact-SQL

A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.

SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories


Answer accepted by question author

LiHong-MSFT 10,061 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.

Was this answer helpful?


3 additional answers

Sort by: Most helpful
  1. Erland Sommarskog 134.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.

    Was this answer helpful?

    0 comments No comments

  2. Tom Phillips 17,786 Reputation points
    2022-01-25T17:18:49.417+00:00

    Was this answer helpful?

    0 comments No comments

  3. Viorel 126.9K Reputation points
    2022-01-25T16:52:02.647+00:00

    Was this answer helpful?


Your answer

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