oracle通过行范围查询取4至10行并排序
不能直接用rownum,要查询出来以后用别名转换。
以EMP表为范例,取4至10行:
select * from (select rownum id,t.* from emp t) where id between 4 and 10;
有需要排序的,一定要这样处理:
select * from ( select rownum rn,t.* from ( select a.* from eba02 a order by eba003) t where rownum <= 110) where rn >= 110;
相关推荐
oraclemch 2020-11-06
Seandba 2020-08-16
dbasunny 2020-08-16
娜娜 2020-06-22
专注前端开发 2020-10-21
苏康申 2020-11-13
vitasfly 2020-11-12
liuyang000 2020-09-25
FellowYourHeart 2020-10-05
赵继业 2020-08-17
whyname 2020-08-16
拼命工作好好玩 2020-08-15
langyue 2020-08-15
写程序的赵童鞋 2020-08-03
Accpcjg 2020-08-02
tydldd 2020-07-30
好记忆也需烂 2020-07-28