【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 ----- ...
随机推荐
- RAD C++Builder xe7 std::map xtree BUG
c++Builder 6 下的std::map还能用,有代码提示. 换到xe7,代码提示出来就一个tt.operator [](),代码没法往下写了. 最后把Target Platforms切换到64 ...
- 为何在JDK安装路径下存在两个JRE?
"两个jre"和"三个lib"的功能简单扼要的解释 安装JDK后,Java目录下有jdk和jre两个文件夹,但jdk下还有一个jre文件夹,而且这个jre比前面 ...
- canvas动画--demo
canvas动画:bubble
- 24.Swap Nodes in Pairs (List; Two-Pointers)
Given a linked list, swap every two adjacent nodes and return its head. For example,Given 1->2-&g ...
- 打劫房屋 · House Robber
[抄题]: 假设你是一个专业的窃贼,准备沿着一条街打劫房屋.每个房子都存放着特定金额的钱.你面临的唯一约束条件是:相邻的房子装着相互联系的防盗系统,且 当相邻的两个房子同一天被打劫时,该系统会自动报警 ...
- quartz cron表达式demo
1.每天0点5分开始,以后每隔15分钟启动一次,23:50停止: 0 5/15 0-23 * * * cron表达式,由于从5分开始,每15分钟执行一次,到了23点的最后一次执行时间正好是23:50. ...
- android studio打包apk
转载:http://chenfeicqq.iteye.com/blog/1889160 1)Android Studio菜单Build->Generate Signed APK (2) ...
- W-D-S-DDR
要把下载到nandflash里面的程序(大于8KB的时候)拷贝到链接地址,故要初始化DDR,才能够使用DDR. ??? 开发板上电后要初始化DRAC,以及DDR,然后把程序拷贝到50000000出运行 ...
- Eclipse下初用lucene
lucene是apache的一个开源项目,一个开放源代码的全文检索引擎工具包. 1. 首先下载lucene,下载地址来自<lucene实战>第2版(页面加载比较忙,等~) http://w ...
- Java初学者不得不知的概念,JDK,JRE,JVM的区别?(转)
JVM(Java Virtual Machine Java虚拟机)可以理解为是一个虚拟出来的计算机,具备着计算机的基本运算方式,它主要负责将java程序生成的字节码文件解释成具体系统平台上的机器指令. ...