sql server 2008 分页方法
----方法1:
WITH UserInfos AS
(
select *,row_number() over(order by user_id) as RowNumber
from user_info
)
select *
from UserInfos
where RowNumber between 21 and 30
----方法2:
select * from
(
select *,row_number() over(order by user_id desc) as RowNumber
from user_info
) A
where RowNumber between 21 and 30