- 21
- 0
- 约1.37万字
- 约 19页
- 2017-06-10 发布于河南
- 举报
oracle数据库函数(国外英文资料)
oracle数据库函数(国外英文资料)
The function in oracle database:
The cartesian set: the record of two tables multiplied
Check the tree for several layers
The select count (distinct level) from emp start with empno = 7839 connect by prior empno = MGR
Select level, lpad (, 2 * level-1) | | ename from emp start with empno = 7839 connect by prior empno = MGR
Use the set operator
The set operator can combine two rows or rows returned by multiple queries.
1, union all: returns all rows retrieved from each query, including duplicate rows
Union: returns all rows retrieved from each query, not including duplicate rows
Intersect: returns the common rows retrieved by two queries
Minus: returns the row that retrieves the second query from the row that was retrieved from the first query minus the remaining record
The difference between UNION and UNION ALL:
1. In the query will encounter UNION ALL, its usage, and the UNION, the UNION only contains distinct features, it can remove the two form duplicate records, and UNION ALL cant, so, from the efficiency of UNION ALL will be a little higher.
The union all is arranged in order, and the union resorts the duplicate data in the two tables
MINUS:
The instructions are applied to two SQL statements. It first finds the results of the first SQL statement, and then see if the results are in the results of the second SQL statement. If so, the data is removed and wont appear in the final results. If the result of the second SQL statement does not exist in the result of the first SQL statement, the data is discarded.
Commonly used functions:
(1) NVL (string, t_number)
When string is NULL (empty) value, take the t_number value
Converting empty values to a value that has real meaning, which affects the value of a single step
Total annual income of all employees in the emp table:
Select ename, sal * 12 * (1 + NVL (comm / 100001)) from emp;
Nvl2 (c1, c2, c3) - c1 is empty, and c3, if c1, c3 is both empty and c2
(2) distinct: prevent data repeatability
Select
您可能关注的文档
- c语言键盘调用(国外英文资料).doc
- C语言题(国外英文资料).doc
- D1压力管道考试模拟题4(国外英文资料).doc
- D1压力管道考试模拟题5(国外英文资料).doc
- DAC0832(国外英文资料).doc
- DataGridView剪切板的操作(国外英文资料).doc
- DB2 备份 以及 各个参数(国外英文资料).doc
- DCDC电源模块(国外英文资料).doc
- DB2模拟题(国外英文资料).doc
- cs1.5控制台指令(国外英文资料).doc
- 河北盐山中学等校2025-2026学年上学期高三一模化学试卷(含解析).docx
- 河北正定中学2025-2026学年高一上学期期末考试物理试卷(含解析).docx
- 河北张家口市怀安县2025-2026学年第一学期期末教学综合评价八年级地理试卷(含解析).docx
- 河南安阳市殷都区2025-2026学年第一学期期末教学质量检测七年级地理试卷(含解析).docx
- 河南安阳市滑县2025一2026学年第一学期期末学业质量监测八年级地理试题(含解析).docx
- 河南安阳市林州市2025-2026学年上学期期末考试高一政治试题(含解析).docx
- 河南焦作市武陟县第一中学2025-2026学年高一上学期1月月考语文试卷(含解析).docx
- 河南济源市2025-2026学年上学期期末学业质量调研七年级历史试卷(含解析).docx
- PICC导管并发症的紧急处理与护理.pptx
- 河南鹤壁市2025-2026学年高二上学期期末考试生物试题(含解析).docx
最近下载
- 长庆一氧化碳中毒事故案例分析.ppt VIP
- 2019创新思维考试.doc VIP
- 数学人教版九年级上册用列举法求概率.2用列举法求概率.pptx VIP
- 《工厂供电》课设计指导书.doc VIP
- 《历代名画记》与《法书要录》.docx VIP
- 心电监护常见心律失常的识别及处理医学64页PPT.pptx VIP
- (网络参考版)广西2025年高考真题历史试卷(含答案).docx VIP
- 中兴VUE-NR高级认证(52-115)练习试题.doc VIP
- 基于改进YOLOv5s算法的城市道路交通场景目标检测研究.pdf VIP
- 高中英语高考复习动词时态专项练习(共70题,附参考答案和解析).docx VIP
原创力文档

文档评论(0)