sql2005 大数据分页查询

来源:互联网 发布:python 运维脚本 编辑:程序博客网 时间:2024/04/20 12:56
 假设有表TableA,字段为FieldA, FieldB,查询第10到20条记录,SQL如下:
select * from
 ( select row_number() over(order by FieldA) as RowNum, *  from  TableA ) t
where   t.RowNum between 10 and 20
原创粉丝点击