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.
Today, we will see the solution to very interesting question received by Martha about Retrieving N Rows After Ordering Query With OFFSET.
Question: How to do Pagination in SQL Server?
SQL SERVER – 2005 T-SQL Paging Query Technique Comparison (OVER and ROW_NUMBER()) – CTE vs. Derived Table
I have received few emails and comments about my post SQL SERVER – T-SQL Paging Query Technique Comparison – SQL 2000 vs SQL 2005. The main question was is this can be done using CTE? Absolutely! What about Performance? It is same! Please refer above mentioned article for history of paging.