- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
SET 运算符 目标 通过本章学习,您将可以: 描述 SET 操作符 将多个查询用SET 操作符联接组成一个新的查询 排序 SET 操作符 UNION 操作符 UNION 操作符返回两个查询的结果集的并集 UNION 操作符举例 UNION ALL 操作符 UNION ALL 操作符举例 INTERSECT 操作符 INTERSECT 操作符举例 MINUS 操作符 MINUS 操作符举例 使用 SET 操作符注意事项 在SELECT 列表中的列名和表达式在数量和数据类型上要相对应 括号可以改变执行的顺序 ORDER BY 子句: 只能在语句的最后出现 可以使用第一个查询中的列名, 别名或相对位置 SET 操作符 除 UNION ALL之外,系统会自动将重复的记录删除 系统将第一个查询的列名显示在输出中 除 UNION ALL之外,系统自动按照第一个查询中的第一个列的升序排列 匹配各SELECT 语句举例 匹配各SELECT 语句举例 使用相对位置排序举例 总结 通过本章学习,您已经可以: 使用 UNION 操作符 使用 UNION ALL 操作符 使用 INTERSECT 操作符 使用 MINUS操作符 使用 ORDER BY 对结果集排序 Practice 15 Overview This practice covers using the Oracle9i datetime functions. The MINUS Operator Use the MINUS operator to return rows returned by the first query that are not present in the second query (the first SELECT statement MINUS the second SELECT statement). Guidelines The number of columns and the datatypes of the columns being selected by the SELECT statements in the queries must be identical in all the SELECT statements used in the query. The names of the columns need not be identical. All of the columns in the WHERE clause must be in the SELECT clause for the MINUS operator to work. Instructor Note To illustrate the MINUS operator, run the script demo\15_minus.sql. The MINUS Operator (continued) In the example in the slide, the employee IDs and Job IDs in the JOB_HISTORY table are subtracted from those in the EMPLOYEES table. The results set displays the employees remaining after the subtraction; they are represented by rows that exist in the EMPLOYEES table but do not exist in the JOB_HISTORY table. These are the records of the employees who have not changed their jobs even once. SET Operator Guidelines The expressions in the select lists of the queries must match in number and datatype. Queries that use UNION, UNION ALL, INTERSECT, and MINUS SET operators in their WHERE clause must have the same number and type of columns in their SELECT list. For example: SELECT employee_id, department_id FROM employees
您可能关注的文档
最近下载
- 巨人 通力电梯NOVA GKE调试说明书故障代码GPN15 GVN15_GKE - 51668093D01-2022.pdf VIP
- 吕梁学院《高等数学下》2025 - 2026学年第一学期期末试卷(A卷).docx VIP
- 抖音超火看表情符号猜成语PPT.pptx VIP
- 德龙ICK6000冰淇淋机说明书.pdf
- 昂科威S用户手册.doc VIP
- DB45T12302015红树林湿地生态系统固碳能力评估技术规程.pdf VIP
- 难点详解人教版8年级数学上册《全等三角形》专项训练试题(解析卷).docx VIP
- 难点详解人教版8年级数学上册《全等三角形》专项训练练习题.docx VIP
- 铁路连续梁桥线形监控量测系统使用培训.pdf
- 麻醉危机管理情境模拟教学 .pdf VIP
文档评论(0)