oracle的break命令排列检索结果
来源:互联网 发布:研究人工智能的意义 编辑:程序博客网 时间:2024/05/17 21:38
clear breaks 清除所有的 break 定义
break on column 在该列上中断
break on row 在每一行上中断
break on Page 在每一页上中断
break on report 在每一报告上中断
skip n 跳过n行
skip page 跳过未用完的页
示例:
SQL> break on deptno skip 1;
SQL> select deptno, ename,sal,
2 row_number()
3 over (partition by deptno
4 order by sal desc)rn,
5 rank()
6 over (partition by deptno
7 order by sal desc)rnk,
8 dense_rank()
9 over (partition by deptno
10 order by sal desc)drnk
11 from emp
12 order by deptno, sal desc;
DEPTNO ENAME SAL RN RNK DRNK
---------- ---------- ---------- ---------- ---------- ----------
10 KING 5000 1 1 1
CLARK 2450 2 2 2
MILLER 1300 3 3 3
20 SCOTT 3000 1 1 1
FORD 3000 2 1 1
JONES 2975 3 3 2
ADAMS 1100 4 4 3
SMITH 800 5 5 4
30 BLAKE 2850 1 1 1
ALLEN 1600 2 2 2
TURNER 1500 3 3 3
MARTIN 1250 4 4 4
WARD 1250 5 4 4
JAMES 950 6 6 5
未用break命令排列时,检索结果为:
SQL> select deptno, ename,sal,
2 row_number()
3 over (partition by deptno
4 order by sal desc)rn,
5 rank()
6 over (partition by deptno
7 order by sal desc)rnk,
8 dense_rank()
9 over (partition by deptno
10 order by sal desc)drnk
11 from emp
12 order by deptno, sal desc;
DEPTNO ENAME SAL RN RNK DRNK
---------- ---------- ---------- ---------- ---------- ----------
10 KING 5000 1 1 1
10 CLARK 2450 2 2 2
10 MILLER 1300 3 3 3
20 SCOTT 3000 1 1 1
20 FORD 3000 2 1 1
20 JONES 2975 3 3 2
20 ADAMS 1100 4 4 3
20 SMITH 800 5 5 4
30 BLAKE 2850 1 1 1
30 ALLEN 1600 2 2 2
30 TURNER 1500 3 3 3
30 MARTIN 1250 4 4 4
30 WARD 1250 5 4 4
30 JAMES 950 6 6 5
- oracle的break命令排列检索结果
- oracle中用BREAK 命令排列
- switch语句没有break的结果
- ORACLE 关键字的检索
- 如何使SQLPlus的查询结果排列整齐(Oracle 10g)
- 如何实现检索结果的检索词变色
- Struts检索结果分页显示的设计
- lucene-检索结果的翻页问题
- 检索结果的分页显示实现(php)
- 统计全排列的结果数目
- Oracle的全文检索技术
- Oracle的全文检索功能
- oracle全文检索的配置
- oracle基本的全文检索
- Oracle exp query条件检索在WINDOWS和LINUX下的命令区别
- 将无序数列升序排列,并输出排列结果和排列后的下标
- sqlplus中break命令的使用
- shenlan211314 Google检索结果
- 网络编程
- gnu make学习
- Hibernate连接SQLServer数据库的配置
- 漾七夕
- 如何学arm linux嵌入式
- oracle的break命令排列检索结果
- Linux(ubuntu) undefined reference to `sin'问题解决
- JQuery中额ajax技术
- Lucene小练八(实现了索引和搜索)
- Zend_Db -> Zend_Db_Table
- java 网络编程 Tcp和UDP 的使用
- css-伪类的理解
- OCP-043 V$FLASHBACK_DATABSE_LOG & V$FLASHBACK_DATABASE_STAT
- 我的灵魂永不下跪:临刑前的最后一课