ITPub博客

首页 > 数据库 > Oracle > OCP 1Z0 051 137

OCP 1Z0 051 137

原创 Oracle 作者:LuiseDalian 时间:2014-05-26 05:53:40 0 删除 编辑
(137)View the Exhibits and examine PRODUCTS and SALES tables.

You issue the following query to display product name and the number of times the product has been sold:

SELECT p.prod_name, i.item_cnt

FROM (SELECT prod_id, COUNT(*) item_cnt FROM sales GROUP BY prod_id) i RIGHT OUTER JOIN products p

ON i.prod_id = p.prod_id;

What happens when the above statement is executed?

A. The statement executes successfully and produces the required output.

B. The statement produces an error because ITEM_CNT cannot be displayed in the outer query.

C. The statement produces an error because a subquery in the FROM clause and outer-joins cannot be used together.

D. The statement produces an error because the GROUP BY clause cannot be used in a subquery in the FROM clause.

答案:(A)

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/17013648/viewspace-1169634/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: OCP 1Z0 051 136
下一篇: OCP 1Z0 051 138
请登录后发表评论 登录
全部评论

注册时间:2012-02-06

  • 博文量
    1986
  • 访问量
    6040893