Oracle OCP认证-Oracle OCM认证

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

ocp 11g认证题库大全:1Z0-051-106题

来源:优技教育

ocp 11g认证题库大全:1Z0-051-106题,完整题库请点击这里联系老师咨询了解

106. Examine the data in the LIST_PRICE and MIN_PRICE columns of the PRODUCTS table:

LIST_PRICE MIN_PRICE

10000 8000

20000

30000 30000

Which two expressions give the same output? (Choose two.)

A. NVL(NULLIF(list_price, min_price), 0)

B. NVL(COALESCE(list_price, min_price), 0)   // 如果list_price为空,则返回min_price,如果min_price为空,则返回空值,如果是空值,则返回0

C. NVL2(COALESCE(list_price, min_price), min_price, 0)

D. COALESCE(NVL2(list_price, list_price, min_price), 0)   //如果list_price为空,则返回min_price,如果min_price为空,则返回0,否则返回list_price,

Answer: BD

试题解析:

LIST_PRICE 从表中看,没有空值,故

B的结果为list_price,D的结果为list_price

C的结果为min_price

A分情况,不等时为list_price,相等时为0

精华阅读