Valid 1z0-071 Dumps shared by ExamDiscuss.com for Helping Passing 1z0-071 Exam! ExamDiscuss.com now offer the newest 1z0-071 exam dumps, the ExamDiscuss.com 1z0-071 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com 1z0-071 dumps with Test Engine here:
Examine the description of EMPLOYEES table: Which three queries return all rows for which SALARY+COMMISSION is greate than 20000?
Correct Answer: A,B,D
In Oracle Database 12c, when dealing with NULL values in arithmetic expressions, the functions NVL, NVL2, and equivalent techniques using NULLIF or arithmetic operations with NULL can be crucial. Option A: SELECT * FROM employees WHERE salary + NULLIF(commission, 0) >= 20000; NULLIF(value1, value2) returns NULL if value1 is equal to value2, otherwise it returns value1. In this case, if commission is NULL, it treats it as 0. This query correctly adds salary and commission (assuming 0 when commission is NULL) and checks if the total is at least 20000. Option B: SELECT * FROM employees WHERE salary + NVL2(commission, commission, 0) >= 20000; NVL2(expr1, expr2, expr3) returns expr2 if expr1 is not NULL; otherwise, it returns expr3. Here, if commission is not NULL, it uses commission, otherwise 0. This condition correctly calculates salary + commission (assuming commission as 0 if it is NULL) and checks if the total is at least 20000. Option D: SELECT * FROM employees WHERE salary + NVL(commission, 0) >= 20000; NVL(expr1, expr2) returns expr2 if expr1 is NULL; otherwise, it returns expr1. This query treats commission as 0 if it is NULL. It correctly sums salary and commission and compares the result against 20000. Options C, E, and F contain either syntax errors or logical errors in handling NULLs and comparisons.