1z0-071 Oracle Database 12c SQL 第43题 NULL、NVL、COUNT

Q43. View the Exhibit and examine the description of the PRODUCT_INFORMATION table.
Which SQL statement would retrieve from the table the number of products having LIST_PRICE as NULL?


A. SELECT COUNT(list_price) FROM product_information WHERE list_price IS NULL;
B. SELECT COUNT(list_price) FROM product_information WHERE list_price = NULL;
C. SELECT COUNT(NVL(list_price, 0)) FROM product_information WHERE list_price IS NULL;

D. SELECT COUNT(DISTINCT list_price) FROM product_information WHERE list_price IS NULL;

Correct Answer: C

count(*) 含 重 复 的和 null

count(expr1) 含 重 复 不 含 null

count(distinct expr1) 不含重复不含 null



猜你喜欢

转载自blog.csdn.net/u013012406/article/details/80756337
今日推荐