Paging Records Using SQL Server 2005 Database - ROW_NUMBER Function
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.