时间:2021-07-01 10:21:17 帮助过:22人阅读
--rowid select * from account where rowid=‘AAASR6AAEAAAAJWAAA‘; |
select * from stu;
select rownum, stu.* from stu;
select rownum, e.* from emp e;
--Top5,查询工资最高的5个人信息
select rownum, t.*
from (
select * from emp order by sal desc
) t
where rownum<=5; |
--row实现分页
select rownum, t.*
from (
select * from emp order by sal desc
) t
where rownum>5 and rownum<=10;--不行,rownum只能<,<=
--下面的方式实现子查询
select rownum, t.*
from (
select * from emp order by sal desc
) t
where rownum<=10; |
--分页查询,查询6到10行记录
select *
from (
select rownum rn, t.*
from (
select * from emp order by sal desc
) t
where rownum<=10
) temp
where temp.rn>5 and temp.rn<=10; |
Oracle_rowid_rownum分页
标签:分页查询 sel from ack data- table font weight ati