SQL Server && mysql paging sql statement summary

the sqlserver paging statement

the number of select top display per page * from table where the primary key id not in (select top each page displayed skilled * current page number primary key id from table)

mysql

select * from table limit the current page number * the number of the number of displayed per page, per page

First page index starts with 0

Sqlserver2005 the id primary key generation strategy than self-energizing paging solutions

select * from (select *, row_number () over (order by id) as rownum from persmember) as love, persmemberinfo as q
where rownum between 0 and 10 and love.id = q.id

select * from (select *, row_number () over (order by id) as rownum from persmember) as love, persmemberinfo as q
where rownum between 11 and 21 and love.id = q.id

select * from (select *, row_number () over (order by id) as rownum from persmember) as love, persmemberinfo as q
where rownum between 22 and 32 and love.id = q.id

Another way to write
The WITH OrderedOrders AS
(SELECT *, ROW_NUMBER () OVER (order by [id]) as RowNumber FROM persmember) SELECT * FROM OrderedOrders
WHERE RowNumber between 50 and 60;