views:

38

answers:

3

How I can implement paging in SQL Server database it has no LIMT keyword like mysql?

A: 

It doesn't use LIMIT, but you can use TOP:

SELECT TOP 10 *
FROM foo
WHERE whateverPagingID >= 650 /* or whatever the last page started with */
ORDER BY pagingID;
Dave Markle
This only gets the first page. You need to use the ROW_NUMBER function
Tim
+8  A: 

Great article here

Ardman
A: 

You can also use row_number()

vaso
sorry, did not notice Tim's comment below
vaso