数据伪劣 行号
ROWNUM
SELECT ROWNUM, empno,ename,sal from emp;
取出第一行数据
SELECT ROWNUM, empno,ename,sal from emp WHERE ROWNUM = 1;
取出第n行数据
SELECT ROWNUM, empno,ename,sal from emp WHERE ROWNUM <= 10;
分页
SELECT rn,empno,ename,sal from (
SELECT ROWNUM rn,empno,ename,sal from emp WHERE ROWNUM <= 10
) t WHERE t.rn >= 6
SELECT rn,empno,ename,sal from (
SELECT ROWNUM rn,empno,ename,sal from emp WHERE ROWNUM <= (currentPage*LineSize)
) t WHERE t.rn >=((currentPage-1)*LineSize)
行rowid 唯一编号
SELECT rowid from dept;
AAAVNrAAEAAAACHAAA
SELECT * from dept where rowid = 'AAAVNrAAEAAAACHAAA'