Skip to main content
Paging Records Using SQL Server 2005 Database - ROW_NUMBER Function
Entry Date: Rate:
RSS Description:
SQL Server 2005 has a ROW_NUMBER Function that can help with paging records for you database applications. ROW_NUMBER returns a sequential number, starting at 1, for each row returned in a resultset.

If you use ROW_Number for paging (two nested selects), you will find in this article an interesting performance tip, placing a TOP in your inner query makes your query run faster

The author offers a more generic and elegant way to do the trick