SQL 2005 Query Reference
2 answers
For those who don't feel like clicking: The solution is to add the row numbers to the result set (using syntax "ROW_NUMBER() OVER (...)"
) and then refer to the row number column in the WHERE clause. How:
SELECT
*,
ROW_NUMBER() OVER (ORDER BY LastName, FirstName) AS RowNumber
FROM
Table
WHERE
RowNumber > 10
AND RowNumber <= 20
10 and 20 can be parameters for recording start and stop.
+1
source to share