OCP-1Z0-051-V9.02-147题
来源:互联网 发布:java中的构架 编辑:程序博客网 时间:2024/05/18 15:54
147. 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 table. 分类显示所有值
B. It produces an error because the subquery gives an error.
C. It shows COST_REMARK for all the promos in the promo category 'TV'.
D. It produces an error because subqueries cannot be used with the CASE expression.
Answer: A
答案解析:
1、首先运行子查询,得出一个数值
2、所有的promos 根据上面计算的数值,来进行分类。故选择A
- OCP-1Z0-051-V9.02-147题
- OCP-1Z0-051-V9.02-1题
- OCP-1Z0-051-V9.02-1题
- OCP-1Z0-051-V9.02-1题
- OCP-1Z0-051-V9.02-11题
- OCP-1Z0-051-V9.02-12题
- OCP-1Z0-051-V9.02-14题
- OCP-1Z0-051-V9.02-15题
- OCP-1Z0-051-V9.02-17题
- OCP-1Z0-051-V9.02-18题
- OCP-1Z0-051-V9.02-21题
- OCP-1Z0-051-V9.02-118题
- OCP-1Z0-051-V9.02-120题
- OCP-1Z0-051-V9.02-32题
- OCP-1Z0-051-V9.02-33题
- OCP-1Z0-051-V9.02-93题
- OCP-1Z0-051-V9.02-94题
- OCP-1Z0-051-V9.02-95题
- ubuntu下安装并配置tomcat
- mac OSX上eclipse adb无法识别(调试)小米的解决方案
- vim配置好文
- servlet 登陆注销案例
- 已知有个rand7()的函数,返回1到7随机自然数,让利用这个rand7()构造rand10() 随机1~10
- OCP-1Z0-051-V9.02-147题
- 一片WebView的好文章,直接拿过来 = =
- hello world
- MFC对话框程序添加状态栏动态显示时间,随窗口大小变化
- 长沙国储电脑城-学生买电脑-被坑记
- Windows消息机制的流程及PreTranslateMessage作用和使用方法
- 有一个四分钟的沙漏,一个七分钟的沙漏,怎样测试九分钟的时间
- string修改字符串函数
- Windows Embedded Compact (CE)流驱动程序开发向导