相同的sql 分页查询结果

select * from
(
select ROW_NUMBER() over(order by id desc) as rowsid,name from _Customer
)
as T where rowsid between 1 and 10;

with datalist as
(
select ROW_NUMBER() over( order by id desc) as rowsid,name from _Customer
)
select * from datalist where rowsid between 1 and 10

posted @ 2015-09-07 16:57  范海辛1990  阅读(148)  评论(0编辑  收藏  举报