Skip to content
Advertisement

How to create procedure for pagging in sql server with OFFSET? [closed]

I want to create a stored procedure to fetch data by PageIndex and PageSize using OFFSET ROWS

Advertisement

Answer

You can use OFFSET and FETCH NEXT for tech number of rows from index. Demo is here

Note: OFFSET is only supported in the higher versions than SQL Server R2 2008.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement