ROWNUM 行号
只能小于
大于全部过滤 无数据
动态生成编号
作用取得第一行的数据
select empno,ename,job,rownum from emp where rownum = 1
取得前n行的数据
select empno,ename,job,rownum from emp where rownum <= 2
页面分页
linSize 几行数据为一页
currentPage当前页
分页
1.
select * from(
select empno,ename,job,rownum rn from emp where rownum <= 10
) temp
where temp.rn > 5;
2.
select * from(
select empno,ename,job,rownum rn from emp where rownum <= ¤tPage*&lineSize
) temp
where temp.rn > (¤tPage - 1) * &lineSize;
3.
select * from(
select empno,ename,job,rownum rn from emp
) temp
where rn between 3 and 5;
ROWID
数据的一个物理地址
可以通过rowid 找到原始数据