Oracle OCP认证-Oracle OCM认证

您当前的位置:优技教育 > ocp考试 >

ocp题库解析:1Z0-051-V9.02-第147题

来源:优技教育

ocp题库解析:1Z0-051-V9.02-第147题,完整题库请点击这里联系老师咨询了解

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

精华阅读