tags:

views:

165

answers:

1

Normally we use the TSQL TOP to get first number of rows of data like this:

SELECT TOP 10 * FROM myTable;

I am not sure if there is any way to get the next 10 and next 10, ... till to the end, just something paging. I cannot figure out. May be CTE statements?

+2  A: 

Here's a solution using row_number() in SQL Server 2005:

Paging Records Using SQL Server 2005 Database - ROW_NUMBER Function

... and here's the Google-search I used to find it:

row_number() over paging

Matt Hamilton