Ncustomers USING (cust_id)
RIGHT OUTER JOINcountries USING (country_id);
C. FROM customers LEFTOUTER JOIN sales USING (cust_id)
RIGHT OUTER JOINcountries USING (country_id);
D. FROM customers LEFTOUTER JOIN sales USING (cust_id)
LEFT OUTER JOINcountries USING (country_id);
Answer: C
解析:
引用官方文档:
■ A left outer joinreturns all the common column values from the left table in the
FROM clause.
■ A right outer join returns all the common column values from the righttable in the
FROM clause.
129. View the Exhibitsand examine the structures of the PROMOTIONS and SALES tables.
eva luate the followingSQL statement:
SQL>SELECTp.promo_id, p.promo_name, s.prod_id
FROM sales s RIGHT OUTERJOIN promotions p
ON (s.promo_id =p.promo_id);
Which statement is trueregarding the output of the above query
A. It gives the detailsof promos for which there have been sales.
B. It gives the detailsof promos for which there have been no sales.
C. It gives details ofall promos irrespective of whether they have resulted in a sale or not.
D. It gives details ofproduct ID s that have been sold irrespective of whether they had a promo ornot.
Answer: C
解析:
引用官方文档:
■ A left outer joinreturns all the common column values from the left table in the
FROM clause.
■ A right outer join returns all the common column values from the righttable in the
FROM clause.
130. View the Exhibitand examine the data in the EMPLOYEES table:
You want to display allthe employee names and their corresponding manager names.
eva luate the followingquery:
SQL> SELECTe.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 beused in the blank in the above query to get the required output

A. o nly inner JOIN
B. only FULL OUTER JOIN
C. only LEFT OUTER JOIN
D. only RIGHT OUTER JOIN
Answer: C
解析:
引用官方文档:
■ A left outer joinreturns all the common column values from the left table in the
FROM clause.
■ A right outer join returns all the common column values from the righttable in the
FROM clause.
131. View the Exhibitand examine the structure of the PRODUCT, COMPONENT, and PDT_COMP
tables.
In PRODUCT table, PDTNOis the primary key.
In COMPONENT table,COMPNO is the primary key.
In PDT_COMP table,(PDTNO,COMPNO) is the primary key, PDTNO is the foreign key referencing
PDTNO in PRODUCT tableand COMPNO is the foreign key referencing the COMPNO in COMPONENT
table.
You want to generate areport listing the product names and their corresponding component names, ifthe
component names andproduct names exist.
eva luate the followingquery:
SQL>SELECTpdtno,pdtname, compno,compname
FROM product _____________pdt_comp
USING (pdtno)____________ component USING(compno)
WHERE compname IS NOTNULL;
Which combination ofjoins used in the blanks in the above query gives the correct output

A. JOIN; JOIN
B. FULL OUTER JOIN; FULLOUTER JOIN
C. RIGHT OUTER JOIN; LEFTOUTER JOIN
D. LEFT OUTER JOIN;RIGHT OUTER JOIN
Answer: C
解析:
题意:if the componentnames and product names exist. 存在就列出来
引用官方文档:
■ A left outer joinreturns all the common column values from the left table in the
FROM clause.
■ A right outer joinreturns all the common column values from the right table in the
FROM clause.
132. View the Exhibitand examine the structure of the SALES and PRODUCTS tables.
In the SALES table,PROD_ID is the foreign key referencing PROD_ID in the PRODUCTS table,
You want to list eachproduct ID and the number of time