【OCP-12c】2019年CUUG OCP 071考试题库(80题)
80、View the exhibit and examine the structure in ORDERS and ORDER_ITEMS tables.

You need to create a view that displays the ORDER_ID, ORDER_DATE, and the total number of items in each order.
Which CREATE VIEW statement would create the views successfully?
A . AS SELECT o.order_id, o.order_date, COUNT (i.line_item_id)
FROM orders o JOIN order_items i
ON (o.order_id = i.order_id)
GROUP BY o.order_id, o.order_date;
B. CREATE OR REPLACE VIEW ord_vu (order_id, order_date)
AS SELECT o.order_id, o.order_date, COUNT (i.line_item_id)
"NO OF ITEMS"
FROM orders o JOIN order_items i ON
(o.order_id = i.order_id) GROUP BY o.order_id,
o.order_date;
C. CREATE OR REPLACE VIEW ord_vu
AS SELECT o.order_id, o.order_date, COUNT (i.line_item_id)
"NO OF ITEMS"
FROM orders o JOIN order_items i
ON (o.order_id = i.order_id) GROUP BY
o.order_id, o.order_date;
D. CREATE OR REPLACE VIEW ord_vu
AS SELECT o.order_id, o.order_date, COUNT (i.line_item_id) ||
"NO OF ITEMS"
FROM orders o JOIN order_items i
ON (o.order_id = i.order_id) GROUP BY
o.order_id, o.order_date
WHITH CHECK OPTION;
Correct Answer: C
Section: (none) Explanation:A答案会报错:ORA-00998: 必须使用列别名命名此表达式,缺少一个别名;B答案视图缺少一个列名,如果加上"NO OF ITEMS"就是正确的。
【OCP-12c】2019年CUUG OCP 071考试题库(80题)的更多相关文章
- 2019 年 Java 最新面试指南共 80 题,赶快收藏起来吧!
2019 年 Java 最新面试指南共 80 题,赶快收藏起来吧! http://blog.zh66.club/index.php/archives/116/
- 【OCP-12c】2019年CUUG OCP 071考试题库(74题)
74.View the exhibit and examine the structure of ORDERS and CUSTOMERS tables. ORDERS Name Null? ...
- 【OCP-12c】2019年CUUG OCP 071考试题库(79题)
79.Which statement is true about transactions? A. A set of Data Manipulation Language (DML) statemen ...
- 【OCP-12c】2019年CUUG OCP 071考试题库(78题)
78.View the exhibit and examine the structure of the CUSTOMERStable. Which two tasks would require s ...
- 【OCP-12c】2019年CUUG OCP 071考试题库(77题)
77.Which two statements are true about sequences created in a single instance database? (Choose two. ...
- 【OCP-12c】2019年CUUG OCP 071考试题库(76题)
76.View the exhibit and examine the description of the DEPARTMENTSand EMPLOYEEStables. The retrieve ...
- 【OCP-12c】2019年CUUG OCP 071考试题库(75题)
75.Which statements are correct regarding indexes? (Choose all that apply.) A. A non-deferrable PRIM ...
- 【OCP-12c】2019年CUUG OCP 071考试题库(73题)
73.Which statement correctly grants a system privilege? A. GRANT CREATE VIEW ON table1 TO user1; B. ...
- 【OCP题库-12c】最新CUUG OCP 071考试题库(72题)
72.View the exhibit for the structure of the STUDENTand FACULTYtables. STUDENT Name Null? Type ----- ...
随机推荐
- Firefox 被Snap.do 劫持
Firefox IE 被劫持 windows的控制面板,卸载程序, 找任何跟「Snap.do」有关的软件,找到後先移除「Snap.Do Engine」再移除「Snap.Do」. 注册表里查找 Snap ...
- Spring Boot实践——Spring Boot 2.0 新特性和发展方向
出自:https://mp.weixin.qq.com/s/EWmuzsgHueHcSB0WH-3AQw 以Java 8 为基准 Spring Boot 2.0 要求Java 版本必须8以上, Jav ...
- 响应式设计的思考:媒体查询(media query)
Jason Grigsby发表了篇文章,<CSS Media Query for Mobile is Fool’s Gold>对媒体查询(media query)吐槽,大意是在移动设备上使 ...
- Inception
http://baijiahao.baidu.com/s?id=1601882944953788623&wfr=spider&for=pc
- 118. Pascal's Triangle (Array)
Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, Retu ...
- Linux基石【第四篇】基本Linux命令
Linux 系统上一切皆文件 命令: pwd -- 查看当前目录 / 代表根目录 clear -- 清屏命令 cd(change directory) -- 切换目录 cd / -- 切换到根目录 ...
- learning.py报错
在廖雪峰大神的网站下学习了Python,其中有一个提供互动环境的Python脚本--learning.py,报了个错,看了下源文件的代码,安排了一下. 报错信息: This learning.py i ...
- 利率计算v4.0--测试--软件工程
利率计算v4.0--测试 package Test; import Model.Interest; import Service.CompoundInterestService; import Ser ...
- Java 设计模式系列(十二)代理模式
Java 设计模式系列(十二)代理模式 代理模式是对象的结构模式.代理模式给某一个对象提供一个代理对象,并由代理对象控制对原对象的引用. package com.github.binarylei.de ...
- iPhone X的UI设计技巧
以下内容由Mockplus团队翻译整理,仅供学习交流,Mockplus是更快更简单的原型设计工具. 果粉们翘首以待的iPhone X终于开始预售了!同样满怀期待的还有设计师和开发人员,他们将在iPho ...