【OCP-12c】CUUG最新考试原题整理及答案(071-10)
10、(5-6) choose the best answer:
Examine the structure of the EMPLOYEES table:
There is a parent/child relationship between EMPLOYEE_ID and MANAGER_ID.
You want to display the name, joining date, and manager for all the employees.
Newly hired employees are yet to be assigned a department or a manager. For them, 'No Manager' should be displayed in the MANAGER column.
Which SQL query gets the required output?
A) SELECT e.last_name, e.hire_date, NVL(m.last_name, 'No Manager') Manager
FROM employees e RIGHT OUTER JOIN employees m
ON (e. manager_id = m.employee_id);
B) SELECT e.last_name, e.hire_date, NVL(m.last_name, 'No Manager') Manager
FROM employees e JOIN employees m
ON (e.manager_id = m.employee_id);
C) SELECT e.last_name, e.hire_date, NVL(m.last_name, 'No Manager') Manager
FROM employees e LEFT OUTER JOIN employees m
ON (e.manager_id = m.employee_id);
D) SELECT e.last_name, e.hire_date, NVL(m.last_name, 'No Manager') Manager
FROM employees e NATURAL JOIN employees m
ON (e.manager_id = m.employee_id);
Answer:C
(解析:因为员工 king 是没有经理的,但是也要显示出来,因为是在经理号这边缺少数据,所以这里要用
左外连接。注意左右的区别:
SELECT e.last_name, e.hire_date, NVL(m.last_name, 'No Manager') Manager
FROM employees e , employees m
WHERE e.manager_id = m.employee_id(+);
)
【OCP-12c】CUUG最新考试原题整理及答案(071-10)的更多相关文章
- 【OCP-12c】CUUG最新考试原题整理及答案(071-11)
11.(5-8) choose the best answer: Examine the structure of the BOOKS_TRANSACTIONS table. You want to ...
- 【OCP-12c】CUUG最新考试原题整理及答案(071-12)
12.(5-12)choose two:Examine the data in the CUSTOMERS table:You want to list all cities that have mo ...
- 【OCP-12c】CUUG最新考试原题整理及答案(071-9)
9.(5-5) choose the best answerView the Exhibit and examine the structure of the SALES and STORES tab ...
- OCP 12c最新考试原题及答案(071-8)
8.(5-4) choose the best answer:You need to produce a report where each customer's credit limit has b ...
- OCP 12c最新考试原题及答案(071-7)
7.(5-1) choose two:View the Exhibit and examine the structure of the PRODUCTS table.Which two tasks ...
- OCP 12c最新考试原题及答案(071-6)
6.(4-21) choose the best answer: View the Exhibit and examine the structure of the CUSTOMERS table. ...
- OCP 12c最新考试原题及答案(071-5)
5.(4-12) choose two: You executed the following CREATE TABLE statement that resulted in an error: SQ ...
- OCP 12c最新考试原题及答案(071-4)
4.(4-11) choose two:View the Exhibit and examine the data in the PRODUCT_INFORMATION table.Which two ...
- OCP 12c最新考试原题及答案(071-3)
3.(4-10) choose the best answer:The user SCOTT who is the owner of ORDERS and ORDER_ITEMS tables iss ...
随机推荐
- Linux实战教学笔记26:http协议原理
目录 第二十六节 http协议原理 第1章 Web服务基础 1.1 http服务重要基础 1.2 HTTP协议 1.3 HTTP资源 1.4 网站流量度量术语 1.5 www服务软件介绍 1.6 本章 ...
- Android Studio 无法正确引入包内存在的类
Android Studio 无法识别同一个 package 里的类,显示为红色,但是 compile 没有问题. 重启,rebuild,clean都没有用. 多半是因为 Android Studio ...
- spring4-2-bean配置-11-基于注解
- appium desktop v1.2.7在android7.0上运行报错“Error: Error executing adbExec”
1.参考下面链接,https://stackoverflow.com/questions/42283921/unable-to-run-appium-tests-on-android-7-0:得知需要 ...
- jquery的get()方法
通过检索匹配jQuery对象得到对应的DOM元素. .get( [index ] ) index 类型: Integer 从0开始计数,用来确定获取哪个元素. .get() 方法允许我们直接访问jQu ...
- web.xml配置详解[转]
引文: 对于一个J2EE领域的程序员而言,基本上每天都会和web应用打交道. 什么是web应用?最简单的web应用什么样?给你一个web应用你该从何入手? 1.什么是web应用? web应用是一种可以 ...
- python中fork()函数生成子进程分析-乾颐堂
python的os module中有fork()函数用于生成子进程,生成的子进程是父进程的镜像,但是它们有各自的地址空间,子进程复制一份父进程内存给自己,两个进程之 间的执行是相互独立的,其执行顺序可 ...
- Linux ls命令详解-乾颐堂CCIE
ls命令用法举例: 例一:列出/home文件夹下的所有文件和目录的详细资料: 1 ls -l -R /home 命令参数之前要有一短横线“-”, 上面的命令也可以这样写: 1 ls -lR /ho ...
- JS中立即执行函数的理解
1.匿名函数不能单独定义,必须进行赋值操作或者立即执行,否则会被JS引擎定义为语法错误 function(){alert(dada);} VM229:1 Uncaught SyntaxError: U ...
- Python实现二叉树的遍历
二叉树是有限个元素的集合,该集合或者为空.或者有一个称为根节点(root)的元素及两个互不相交的.分别被称为左子树和右子树的二叉树组成. 二叉树的每个结点至多只有二棵子树(不存在度大于2的结点),二叉 ...