17,137
社区成员
发帖
与我相关
我的任务
分享select y.fybm, y.ah, y.wslb, y.wsnr, y.jarq, y.ROWNO
from (select t.fybm, t.ah, t.wslb, t.wsnr, t.jarq, rownum ROWNO
from (select fybm, ah, wslb, wsnr, jarq from flws_1 order by id) t) y
where y.ROWNO between 0 and 1000;select y.fybm, y.ah, y.wslb, y.wsnr, y.jarq, y.ROWNO
from (select t.fybm, t.ah, t.wslb, t.wsnr, t.jarq, rownum ROWNO
from (select fybm, ah, wslb, wsnr, jarq from flws order by id) t where rownum <=1000) y
where y.ROWNO >=1;

-- 使用 row_number 函数
select *
from (select fybm, ah, wslb, wsnr, jar, row_number() over(order by id) rn
from flws_1)
where rn between 1 and 2000
,问题虽然无数,还是希望明白原理