各位大侠,麻烦看下这道题,答案B好像不对,帮忙确认下
QUESTION NO: 32
Examine the structure of the EMPLOYEES, DEPARTMENTS, and LOCATIONS
tables.
EMPLOYEES
EMPLOYEE_ID NUMBER NOT NULL, Primary Key
EMP_NAME VARCHAR2 (30)
JOB_ID VARCHAR2 (20)
SALARY NUMBER
MGR_ID NUMBER References EMPLOYEE_ID column
DEPARTMENT_ID NUMBER Foreign key to DEPARTMENT_ID column of the
DEPARTMENTS table
DEPARTMENTS
DEPARTMENT_ID NUMBER NOT NULL, Primary Key
DEPARTMENT_NAME VARCHAR2
(30)
MGR_ID NUMBER References NGR_ID column of the
EMPLOYEES table
LOCATION_ID NUMBER Foreign key to LOCATION_ID column of the
LOCATIONS table
LOCATIONS
LOCATION_ID NUMBER NOT NULL, Primary Key
CITY VARCHAR2 |30)
Which two SQL statements produce the name, department name, and the city of all the
employees who earn more then 10000? (Choose two)
A. SELECT emp_name, department_name, city
FROM employees e
JOIN departments d
USING (department_id)
JOIN locations 1
USING (location_id)
WHERE salary > 10000;
B. SELECT emp_name, department_name, city
FROM employees e, departments d, locations 1
JOIN ON (e.department_id = d.department id)
AND (d.location_id =1.location_id)
AND salary > 10000;
C. SELECT emp_name, department_name, city
FROM employees e, departments d, locations 1
WHERE salary > 10000;
D. SELECT emp_name, department_name, city
FROM employees e, departments d, locations 1
WHERE e.department_id = d.department_id
AND d.location_id = 1.location_id
AND salary > 10000;
E. SELECT emp_name, department_name, city
FROM employees e
NATURAL JOIN departments, locations
WHERE salary > 10000;
Answer: B, D

最新回复
yzsind (2008-8-06 14:28:58)
linhaiqiang (2008-8-06 15:39:13)
Explanation:
These statements show correct syntax and semantics to receive correct results.
Incorrect Answers
A: JOIN ON keywords need to be used to build correct query.
C: This query will built Cartesian product because there is no join conditions in WHERE
clause to join tables.
E: NATURAL JOIN is a join between two where Oracle joins the tables according to the
column(s) in the two tables sharing the same name. It is required to add one more
NATURAL JOIN clause to join additional table.
klmn764 (2008-8-06 18:00:40)
人气火暴,设置经典. 不卖点 勇者大陆、仙踪林设有练级点
新人注册仓库送1000W奇迹币. 各职业第一名到400级送380级全属性武器一把(数量有限5把). 会员不参加冲级奖励
韩国全新奇迹私服,最新奇迹私服版本,全新3D传世私服 游戏中按小键盘2468实现, 不玩不知道 一玩吓一跳!
天龙八部私服基本设置:
50倍20/22/26点无转生,战/圣上线送500点.法/弓/魔上线送1500点.圣上线6000统率
法师守护%80,战士暴光%60,经测试各职业平等.
诛仙私服开放洗点功能,在线洗红,在线加点,在线结婚等.本服只开放1线广告功能(300级可广告)!!
开放洗点(每次300W奇迹币) 在线加点(每次500W奇迹币) 1线开放大陆泡点.
商店出售祝福,初级装备,+1+2+3披风、恶魔票、+4血堡、恶魔材料、转职物品等.
狼魂要塞←幽暗黑森林 亚特兰蒂斯←古战场
传奇世界私服经典设置:
魔炼之地:请按照规定进入后 可打套装.
赤色要塞 卡6BOSS 卡6每小时刷新一次BOSS