Oracle_rowid_rownum_分页
--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; |
--row实现分页
select rownum, t.*
from (
select * from emp order by sal desc
) t
where;--不行,rownum只能<,<=
--下面的方式实现子查询
select rownum, t.*
from (
select * from emp order by sal desc
) t
where; |
--分页查询,查询6到10行记录
select *
from (
select rownum rn, t.*
from (
select * from emp order by sal desc
) t
) temp
where and; |