SELECT *FROM ( SELECT *,ROW_NUMBER() OVER ( ORDER BY 排序字段 ) AS Num FROM 表 ) tWHERE t.Num BETWEEN 10 AND 20
先用ROW_NUMBER()函数生成行号,然后对此子查询用WHERE过滤
select * from test where test.id between 10 and 20