【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 ...
随机推荐
- Running Bitvise SSH Client as a Windows Service
It is possible to run a Windows program as a system service. The advantage of services is that they ...
- java.io.CharConversionException: Not an ISO 8859-1 character:
java.io.CharConversionException: Not an ISO 8859-1 character: XXX 这个问题可能是因为outputstream输出中文字造成的影响. r ...
- 归纳整理Linux下C语言常用的库函数----内存及字符串控制及操作
在没有IDE的时候,记住一些常用的库函数的函数名.参数.基本用法及注意事项是很有必要的. 参照Linux_C_HS.chm的目录,我大致将常用的函数分为一下几类: 1. 内存及字符串控制及操作 2. ...
- mac下搭建appium
1.安装java 下载地址:http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html ...
- JS如何判断浏览器类型,如何模拟浏览器类型(模拟微信浏览器)
一.前言 在编写前端代码时,为了页面兼容性,我们往往需要考虑不同的浏览器类型 而这就需要在前端代码中进行识别和区分 接下来就来谈谈对浏览器类型的识别 二.正文 (一).查看浏览器类型的核心代码 var ...
- oracle触发器--if else demo
CREATE OR REPLACE Trigger trig_solr_index_el_lesson After Update of lessonid, lessonname, lessongoal ...
- js中with 用法
with 语句用于设置代码在特定对象中的作用域. 它的语法: with (expression) statement例如: var sMessage = "hello"; with ...
- KMP算法,查询匹配串的个数
想不到时隔两年回来重新学习KMP算法还是那么难,不过理解了大概,把例程贴上来,如果是求数量只需要加个count变量记录即可. #include"stdio.h" #include& ...
- jsoncpp学习
// MyJsonTest.cpp : 定义控制台应用程序的入口点. // #include "stdafx.h" #include <fstream> #includ ...
- centos7 单台zookeeper安装
1.创建 /usr/local/services/zookeeper 文件夹: mkdir -p /usr/local/services/zookeeper 2.进入到 /usr/local/ser ...