【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 ...
随机推荐
- linux nohup命令使程序在后台运行的方法
在linux操作系统中从后台一直运行某个程序的方法,就是使用nohup命令了. Unix/Linux下一般比如想让某个程序在后台运行,很多都是使用 & 在程序结尾来让程序自动运行. 比如要运行 ...
- jsp页面获取地址栏中的参数
- WSAStartup function
[WSAStartup function] Parameters wVersionRequested [in] The highest version of Windows Sockets speci ...
- JS如何判断浏览器类型,如何模拟浏览器类型(模拟微信浏览器)
一.前言 在编写前端代码时,为了页面兼容性,我们往往需要考虑不同的浏览器类型 而这就需要在前端代码中进行识别和区分 接下来就来谈谈对浏览器类型的识别 二.正文 (一).查看浏览器类型的核心代码 var ...
- ios 获取当前wifi名称
ios5之前可以通过读取配置文件获取,ios5以后苹果修改wifi列表文件位置,只有root权限才可以读取. ios4:/System/Library/SystemConfiguration/WiFi ...
- java替换特殊字符串
开始想到String.replaceFirst(regex, replacement)和String.replaceAll(regex, replacement); 但特殊字符没替换成功. 用法:St ...
- IPMI (Intelligent Platform Management Interface)
4.3. ipmitool - utility for controlling IPMI-enabled devices 4.3.1. ipmitool 4.3.1.1. ubuntu 确定硬件是否支 ...
- JavaScript RegExp.exec() 方法
定义和用法: exec() 方法用于检索字符串中的正则表达式的匹配. 语法: RegExpObject.exec(string); RegExpObject:必须参数,正则表达式: string:必须 ...
- [OS] 远程启动计划任务时以管理员身份运行
在Jenkins建了一个task自动启动Selenium的Grid,命令行是这样写的: schtasks /end /tn RestartGrid /s SZTEST201606 /u szdomai ...
- JVM 垃圾回收- 转载 知识碎片
最近关注了一下垃圾回收的问题,想了解一下JVM 关于方法区的垃圾回收机制,找了几篇文章,不同的文章从不同角度讲述了一下,嗯... 拼凑起来 记录一下, 有些未验证正确性... JVM 方法区 当JVM ...