【ocp-12c】最新Oracle OCP-071考试题库(37题)
19.choose the best answer
View the Exhibit and examine the structure of the PROMOTIONS table.
Evaluate the following SQL statement:
SQL>SELECT promo_name,CASE
WHEN promo_cost>=(SELECT AVG(promo_cost)
FROM promotions
WHERE promo_category= 'TV')
THEN 'HIGH'
ELSE 'LOW'
END COST_REMARK
FROM promotions;
Which statement is true regarding the outcome of the above query?
A) It shows COST_REMARK for all the promos in the promo category 'TV' .
B) It produces an error because subqueries cannot be used with the CASE expression.
C) It shows COST_REMARK for all the promos in the table.
D) It produces an error because the subquery gives an error.
Answer:C
(解析:category 'TV'只是判定 promo_cost 的一个条件,显示的是所有 category 的内容。
使用如下语句验证:
SELECT promo_name,promo_category,CASE
WHEN promo_cost>=(SELECT AVG(promo_cost)
FROM promotions
WHERE promo_category= 'TV')
THEN 'HIGH'
ELSE 'LOW'
END COST_REMARK
FROM promotions
where rownum < 30;
)
【ocp-12c】最新Oracle OCP-071考试题库(37题)的更多相关文章
- 【OCP题库-12c】最新CUUG OCP 071考试题库(72题)
72.View the exhibit for the structure of the STUDENTand FACULTYtables. STUDENT Name Null? Type ----- ...
- 【OCP题库-12c】最新CUUG OCP 071考试题库(71题)
71.(32-18) choose three Which three statements indicate the end of a transaction? (Choose three.) A) ...
- 【OCP题库-12c】最新CUUG OCP 071考试题库(70题)
70.(31-2)choose the best answer: View the Exhibit and examine the structure of the Book table. The B ...
- 【OCP题库-12c】最新CUUG OCP 071考试题库(69题)
69.(31-1)choose the best answer: Evaluate the following query: SELECT INTERVAL '300' MONTH, INTERVAL ...
- 【OCP题库】最新CUUG OCP 12c 071考试题库(68题)
68.(29-13)choose two: Which two statements are true? (Choose two.) A) DICTIONARY is a view that cont ...
- 【OCP题库】最新CUUG OCP 12c 071考试题库(67题)
67.(25-8)choose the best answer: View the Exhibit and examine the structure of CUSTOMERS table. Eval ...
- 【OCP题库】最新CUUG OCP 12c 071考试题库(66题)
66.(22-19)choose two Examine the structure proposed for the TRANSACTIONS table: Which two statements ...
- 【OCP题库】最新CUUG OCP 12c 071考试题库(65题)
65.(22-16) choose the best answer: The CUSTOMERS table has the following structure: You need to writ ...
- OCP 12c最新考试题库及答案(071-2)
2019-02-12 16:23:54 2.(4-7) choose the best answer:You need to display the first names of all cust ...
- 【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 ...
随机推荐
- Spring Boot实践——Spring Boot 2.0 新特性和发展方向
出自:https://mp.weixin.qq.com/s/EWmuzsgHueHcSB0WH-3AQw 以Java 8 为基准 Spring Boot 2.0 要求Java 版本必须8以上, Jav ...
- delphi 工具
http://blog.csdn.net/maxwoods/article/category/1285993
- 8.3.2018 1 Quick and dirty 快而脏的快餐
Quick and dirty 快而脏的快餐 BEIJING 北京 Food delivery is a booming business. Waste is piling up, too 送餐 ...
- Android gralloc 模块实例
本文实例为借鉴 http://www.ixueyi.com/jingyan/1865079.html 该文档后所写.主要是android的gralloc操作显存的模块实例,如有不正确的地方欢迎指出谢谢 ...
- servlet访问路径的写法
<?xml version="1.0" encoding="UTF-8"?><web-app xmlns:xsi="http://w ...
- python之with...as
[python之with...as] 参考:http://python.42qu.com/11155501
- 用 RPM 打包软件,第 1 部分
http://www.ibm.com/developerworks/cn/linux/management/package/rpm/part1/ RPM(Red Hat Package Manager ...
- 分布式事务,EventBus 解决方案:CAP【中文文档】(转)
出处:http://www.cnblogs.com/savorboard/p/cap-document.html 前言 很多同学想对CAP的机制以及用法等想有一个详细的了解,所以花了将近两周时间写了这 ...
- 【转】java遍历实体类的属性和数据类型以及属性值
和同学接了个外包的活,由于项目中很多地方要用到poi导出excel,而每次导出都要写很多相同的代码,因为poi的cell.setCellValue();每次设置的都是不同实体bean的属性值,导致代码 ...
- platform总线驱动代码分析
/************************************************************************/ Linux内核版本:2.6.35.7 运行平台:三 ...