ocp考试资料群:569933648 验证码:ocp ocp 12c 19c考试题库解析与资料群:钉钉群号:35277291
全部博文(486)
分类: oracle
2019-11-27 09:44:09
choose the best answer
examine the description of the product_information table:
name null? type
------------------------------------------------------------------------
prod_id not null number(2)
prod_nane varcrar2 (10)
list_price number(6,2)
which query retrieves the number of products with a null list price?
a) select (count(list_price) ferm product_intormation where list_price=null;
b) select count(nvl( list_price,0) )from pruduct_information where list_price is null;
c) select count(distinct list_price) from produet_infomation where list_price is nulll.
d) select count(list_price) from proceduct_information where list_price is null;
answer:b
(解析:这道题的难点在题目的提问上,题目的意思是哪个查询能够检索到 price 为空的产品数量。由于 list_price 本身为空,count 函数处理的方式是忽略,所以要用 nvl 函数来处理。)