【2019年8月版】OCP 071認證考試原題-第37題

Choose the best answeride

Examine the description of the PRODUCT_INFORMATION table:函數

Name NULL? Typeorm


PROD_ID NOT NULL NUMBER(2)ip

PROD_NANE VARCRAR2 (10)產品

LIST_PRICE NUMBER(6,2)it

Which query retrieves the number of products with a null list price?io

A) SELECT (COUNT(list_price) FERM Product_intormation WHERE list_price=NULL;table

B) SELECT Count(nvl( list_price,0) )FROM pruduct_information WHERE list_price is null;form

C) SELECT COUNT(DISTINCT list_price) FROM produet_infomation WHERE list_price is nulll.class

D) SELECT COUNT(list_price) from proceduct_information where list_price is NULL;

Answer:B

(解析:這道題的難點在題目的提問上,題目的意思是哪一個查詢可以檢索到 price 爲空的產品數量。因爲 list_price 自己爲空,count 函數處理的方式是忽略,因此要用 nvl 函數來處理。)

相關文章
相關標籤/搜索