orcal - 伪列

数据伪劣 行号
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'
上一篇:centos7卸载YUM后重装过程 -bash: yum: command not found / -bash: yum: 未找到命令


下一篇:jquery,javascript常用