select top pageSize, * from (SELECT row_number() over(order by id desc) as rownumber,*
FROM tb1) A where rownumber > (pageIndex-1)*pageSize

05-11 20:01