设为首页 加入收藏

TOP

ocp1Z0-051106-140题解析(八)
2014-11-24 08:07:01 来源: 作者: 【 】 浏览:32
Tags:ocp1Z0-051106-140 解析
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

首页 上一页 5 6 7 8 9 10 下一页 尾页 8/10/10
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇DBA手记:DBA诊断利器 - Event 100.. 下一篇Oracle 11g New 使用数据恢复指导

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·MySQL 基础入门视频 (2025-12-26 23:20:22)
·小白入门:MySQL超详 (2025-12-26 23:20:19)
·关于 MySQL 数据库学 (2025-12-26 23:20:16)
·SOLVED: Ubuntu 24.0 (2025-12-26 22:51:53)
·Linux 常用命令最全 (2025-12-26 22:51:50)