首页 > 数据库 > Oracle > OCP 1Z0 051 149
|
SELECT prod_id FROM costs WHERE promo_id IN (SELECT promo_id FROM promotions WHERE promo_cost < ALL (SELECT MAX(promo_cost) FROM promotions GROUP BY (promo_end_date - promo_begin_date))); |
What would be the outcome of the above SQL statement?
A. It displays prod IDs in the promo with the lowest cost.
B. It displays prod IDs in the promos with the lowest cost in the same time interval.
C. It displays prod IDs in the promos with the highest cost in the same time interval.
D. It displays prod IDs in the promos with cost less than the highest cost in the same time interval.
答案:(D)
解析:
注意ALL后面的子查询中只有一个值
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/17013648/viewspace-1170631/ ,如需转载,请注明出处,否则将追究法律责任。