一、原题
二、题目翻译
三、题目解析
View the Exhibit and examine the data in the EMPLOYEES table:

You want to display all the employee names and their corresponding manager names.
Evaluate the following query:
SQL> SELECT e.employee_name "EMP NAME", m.employee_name "MGR NAME"
FROM employees e ______________ employees m
ON e.manager_id = m.employee_id;
Which JOIN option can be used in the blank in the above query to get the required output?
A. only inner JOIN
B. only FULL OUTER JOIN
C. only LEFT OUTER JOIN
D. only RIGHT OUTER JOIN
答案:C
You want to display all the employee names and their corresponding manager names.
Evaluate the following query:
SQL> SELECT e.employee_name "EMP NAME", m.employee_name "MGR NAME"
FROM employees e ______________ employees m
ON e.manager_id = m.employee_id;
Which JOIN option can be used in the blank in the above query to get the required output?
A. only inner JOIN
B. only FULL OUTER JOIN
C. only LEFT OUTER JOIN
D. only RIGHT OUTER JOIN
答案:C
二、题目翻译
查看EMPLOYEES表的数据
要显示所有员工姓名和对应的经理的姓名。
评估下面的语句
哪一种JOIN操作能被用于空白处,给出所需结果?
要显示所有员工姓名和对应的经理的姓名。
评估下面的语句
哪一种JOIN操作能被用于空白处,给出所需结果?
三、题目解析
上面的SQL语句中,e代表员工表,而m代表经理表,连接条件e.manager_id = m.employee_id,也就是以员工表的员工为基准,找出他们各自的经理。表连接的用法,详见:
http://blog.csdn.net/holly2008/article/details/25704471
http://blog.csdn.net/holly2008/article/details/25704471
本文介绍了一个具体的SQL查询案例,展示了如何使用JOIN操作来获取员工及其对应经理的信息,并解释了为什么在该场景下选择特定类型的JOIN。

被折叠的 条评论
为什么被折叠?



