Paging in MS SQL Server
Published on: 04 October 2007 By: Nick Slater
Creating Page Numbers is easier with MYSQL. In MS-SQL Server there are many ways of paging data. The following method is simpler of all and works well with a few hundred thousand records in a table.
CODE:
SELECT myvalue, mydata
FROM
(
SELECT ROW_NUMBER()
OVER
(
ORDER BY myvalue ASC
)
AS Row, myvalue, mydata FROM table_1
)
AS BlogLimited
WHERE Row >= 90000 AND Row <= 90010

View All Articles (Articles Archive)