View the Exhibit and evaluate the structure and data in the CUST_STATUS table.
You issue the following SQL statement:
Which statement is true regarding the execution of the above query?
A.
It produces an error because the AMT_SPENT column contains a null value.
B.
It displays a bonus of 1000 for all customers whose AMT_SPENT is less than
CREDIT_LIMIT.
C.
It displays a bonus of 1000 for all customers whose AMT_SPENT equals CREDIT_LIMIT,
or AMT_SPENT is null.
D.
It produces an error because the TO_NUMBER function must be used to convert the
result of the NULLIF function before it can be used by the NVL2 function.
Explanation:
The NULLIF Function
The NULLIF function tests two terms for equality. If they are equal the function returns a null,
else it returns the first of the two terms tested.
The NULLIF function takes two mandatory parameters of any data type. The syntax is
NULLIF(ifunequal, comparison_term), where the parameters ifunequal and comparison_termare compared. If they are identical, then NULL is returned. If they differ, the ifunequal
parameter is returned.
The correct answer is A.
NULLIF( expr1, expr2 )
expr1 can be an expression that evaluates to NULL, but it can not be the literal NULL.
I agree
I agree too
C
C
Imposible, C is not possible.
For custno = 2 or custno = 4, NULLIF returns amt_spent value because amt_spent and credit limit don’t have the same value, nvl2 return 0 value because the first parameter is not null.
C is correct
AMT CREDIT BONUS
——— ———- ———-
1000 1000 1000 — equal
2000 2500 0
3000 1000
3000 2800 0
C
Hi Daragh
Passed 1Z0-061 exam recently!
Total 75 questions, few new questions, learned them from PassLeader 1Z0-061 dumps (http://www.passleader.com/1z0-061.html), which is 100% pass ensure now!
p.s.
Free PassLeader 1Z0-061 dumps from Google Drive:
https://drive.google.com/open?id=0B-ob6L_QjGLpZ2pPVDVMSlJ6UjA
Good Luck!
thank you very much
Please help to confirm if this dumps is still valid
A
SQL> select nullif(NULL,1) from dual;
select nullif(NULL,1) from dual
*
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected – got CHAR
Could anyone help to update newest version of this code 1Z0-061?