- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
oracle 10g多表查询
Example of FULL OUTER JOIN This query retrieves all rows in the EMPLOYEES table, even if there is no match in the DEPARTMENTS table. It also retrieves all rows in the DEPARTMENTS table, even if there is no match in the EMPLOYEES table. Instructor Note It was not possible to complete this in earlier releases using outer joins. However, you could accomplish the same results using the UNION operator. SELECT e.last_name, e.department_id, d.department_name FROM employees e, departments d WHERE e.department_id (+) = d.department_id UNION SELECT e.last_name, e.department_id, d.department_name FROM employees e, departments d WHERE e.department_id = d.department_id (+); SELECT e.last_name, e.department_id, d.department_name FROM employees e RIGHT OUTER JOIN departments d ON (e.department_id = d.department_id) ; RIGHT OUTER JOIN … SELECT e.last_name, e.department_id, d.department_name FROM employees e FULL OUTER JOIN departments d ON (e.department_id = d.department_id) ; FULL OUTER JOIN … Schedule: Timing Topic 55 minutes Lecture 55 minutes Practice 110 minutes Total Lesson Aim This lesson covers how to obtain data from more than one table. Data from Multiple Tables Sometimes you need to use data from more than one table. In the slide example, the report displays data from two separate tables. Employee IDs exist in the EMPLOYEES table. Department IDs exist in both the EMPLOYEES and DEPARTMENTS tables. Location IDs exist in the DEPARTMENTS table. To produce the report, you need to link the EMPLOYEES and DEPARTMENTS tables and access data from both of them. Cartesian Products When a join condition is invalid or omitted completely, the result is a Cartesian product, in which all combinations of rows are displayed. All rows in the first table are joined to all rows in the second table. A Cartesian product tends to generate a large number of rows, and the result is rarely useful. You should always include a valid join
您可能关注的文档
最近下载
- 2025年执业药师之西药学专业一模考预测题库(夺冠系列).docx VIP
- ISO 15614-13 2023 金属材料焊接工艺规程及评定 电阻对焊和闪光焊(中文版).pdf
- 过敏性休克抢救指南2025版.docx
- 扩张型心肌病的护理查房课件.pptx VIP
- 第一章 食品工艺学导论.ppt VIP
- 系统性红斑狼疮(共44张PPT).pptx VIP
- 3.1 标志设计 (课件)人教版七年级美术上册.pptx VIP
- genesis2000脚本编写,Perl╱TK常见问答中文版.pdf VIP
- 2024《广西农产品电商物流SWOT-PEST分析及发展策略研究(数据图表论文)》16000字.docx VIP
- 剑桥国际少儿英语KB1第1-12单元文本-(英汉版).pdf VIP
文档评论(0)