Question: How to skip top N Rows in SQL Server and retrieve the rest of the rows? Answer: I had asked the above question in one of the interviews last week.
OFFSET FETCH in SQL Server: Get Rows 21 to 30 After ORDER BY
OFFSET FETCH reads a block of rows from the middle of a sorted result. The demo returns rows 21 to 30, builds pages from a page number and measures why deep pages cost more. A seek based alternative reads the same two pages every time.
How to do Pagination in SQL Server? – Interview Question of the Week #111
How do you do pagination in SQL Server? A popular interview question. Instead of pulling every row into the app, here is a method that returns just one page.
SQL SERVER – Tricks for Row Offset and Paging in Various Versions of SQL Server
Paging is needed in almost every application. I show row offset and paging scripts for each version from SQL Server 2000 to 2012, using AdventureWorks.
Where T-SQL Differs From the ANSI Standard
See where T-SQL differs from the ANSI standard in row limits, concatenation, NULL behavior, and practical query portability.
OFFSET FETCH Paging and Its Deep Page Problem
Use OFFSET FETCH with a unique sort order, compare early and deep page reads, and decide when a cursor based approach fits better.
SQL SERVER – Server Side Paging in SQL Server Denali – Part2
Part 2 of server side paging in SQL Server Denali: a reader keeps rows per page and page number in a table, and OFFSET and FETCH can read them from there.







