3
I tested with two forms, but did not succeed.
select * from table OFFSET 10 ROWS
select top 10 * from table OFFSET 10 ROWS FETCH NEXT 5 ROWS ONLY
Interestingly I never had to offset this version of Sqlserver, and now I’m having difficulties with something relatively simple.
Errors displayed on console:
Message 102, Level 15, Status 1, Line 3
Incorrect syntax near 'OFFSET'.
Message 153, Level 15, State 2, Line 3
Invalid Usage of the option NEXT in the FETCH statement.
I might be wrong, but I confess that I did not find answers on the site that really answer my question (which is curious, since it is something relatively simple).
I want to be wrong, but I believe that LIMIT does not work on Sqlserver. This is a MYSQL command, isn’t it? I at least use TOP 10 in Sqlserver, and LIMIT 10 in MYSQL.
– Cobra
The constructions you used only work in the 2012 (onward) version of SQL Server.
– José Diz
See "Comparing performance for Different SQL Server paging methods" https://www.mssqltips.com/sqlservertip/2696/comparing-performance-for-different-sql-server-paging-methods/
– José Diz