select * from
(select
customer_id,customer_date,customer_result,rownumber()over(order by
customer_id asc) as id from customer_djxx )
as tb
where tb.id between 10 and 20
between and 前后两者都包含。即记录是从排序好的记录中选出10到20这11条记录
若不想让你包括后者或者前者可采取下面这种办法
select * from (
select customer_id,customer_date,customer_result,rownumber()
over(order by customer_id asc ) as rowid
as a where a.rowid >=
本文介绍了一种使用SQL进行分页查询的方法,通过ROW_NUMBER()窗口函数为记录排序,并利用BETWEEN...AND子句选取特定范围内的记录,实现精准的数据分页。
8669

被折叠的 条评论
为什么被折叠?



