【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 ----- ...
随机推荐
- 解决pip安装时的Readtime out问题
方法一 pip --default-timeout=100 install -U Pillow就可以了方法二 pip install pyinstaller -i https://pypi.douba ...
- 用logger在控制台打印信息
第一步: 导入jar包,maven项目可以直接添加 <dependency> <groupId>log4j</groupId> <artifactId> ...
- UNITY 中List.Sort的BUG
List<int> lst = new List<int>(); lst.Add(); lst.Add(); lst.Add(); lst.Add(); lst.Add(); ...
- Golang之实现(链表)
链表算法 package main import "fmt" type LinkNode struct { data interface{} next *LinkNode } ty ...
- iOS界面设计,12个优秀案例激发你的灵感
总所周知,iOS和Android是当今两大移动平台,前者采用Human Interface Design,后者采用Material Design.作为设计师,尤其是App设计师,总是会在这两者进行设计 ...
- Python中解码decode()与编码encode()与错误处理UnicodeDecodeError: 'gbk' codec can't decode byte 0xab
编码方法encoding() 描述 encode() 方法以指定的编码格式编码字符串,默认编码为 'utf-8'.将字符串由string类型变成bytes类型. 对应的解码方法:bytes decod ...
- 超级详细的解决方法 (CentOS7) :永久修改 mysql read-only 问题 could not retrieve transation read-only status server
一.查看mysql的事物隔离级别 SHOW VARIABLES LIKE '%iso%'; 二.临时修改事物隔离级别 SET GLOBAL tx_isolation='READ-COMMITTED'; ...
- 从Objective-C到Swift,你必须会的(四)DLog
调试的时候打断点太慢,所以输出log就是一个很好的选择了.断点,一行一行的按,太麻烦了.从log里一条一条的看,很快就可以找到到哪个函数的哪个地方这个代码就没执行了.这里不详细讨论调试技巧的事.不过大 ...
- SQL SERVER 2012数据库:开启防火墙导致外部无法连接数据库解决办法
SQL SERVER 2012数据库:开启防火墙导致外部无法连接数据库解决办法 将以下代码存为OpenSqlServerPort.bat文件: netsh advfirewall firewall a ...
- HRBUST1200 装修 2017-03-06 15:41 94人阅读 评论(0) 收藏
装修 hero为了能顺利娶princess ,花了血本,买了个房子,现在决定装修.房子的长度为n米,宽度为3米,现在我们有2种地砖,规格分别是1米×1米,2米×2米,如果要为该教室铺设地砖,请问有几种 ...