常用的几种分页
1.SELECT * FROM
( SELECT
ROW_NUMBER() OVER (ORDER BY sort_key ASC) AS ROW_NUMBER,
COLUMNS
FROM tablename
) foo
WHERE ROW_NUMBER >= 11 and ROW_NUMBER <=20
2.select top 10 * from Orders where OrderID>
(select max(OrderID) from
(select top 20 OrderID from Orders order by OrderID ASC ) t0
)
order by OrderID ASC
3.select top 10 t_id,t_name from test where 1=1 and t_id not in(select top 10 id from test order by t_id)