1. 程式人生 > >【OCP-12c】CUUG最新考試原題整理及答案(071-12)

【OCP-12c】CUUG最新考試原題整理及答案(071-12)

val out answer 的人 swe rec you sele lan

12、(5-12)choose two:
Examine the data in the CUSTOMERS table:
You want to list all cities that have more than one customer along with the customer details.
Evaluate the following query:
SQL>SELECT c1.custname, c1.city
FROM Customers c1__Customers c2
ON (c1.city=c2.city AND c1.custname<>c2.custname);

Which two JOIN options can be used in the blank in the above query to give the correct output?
A) NATURAL JOIN
B) RIGHT OUTER JOIN
C) LEFT OUTER JOIN
D) JOIN
E) FULL OUTER JOIN

Answer:BD
(解析:驗證過
A 選項不正確,NATURAL JOIN 自然連接不需要關聯條件,所以下面的 ON 子句會報錯。
CE 選項不正確,LEFT OUTER JOIN 和 FULL OUTER JOIN 都會顯示有客戶但是沒在某個城市的人

【OCP-12c】CUUG最新考試原題整理及答案(071-12)