The PRODUCTS table has the following structure:
Evaluate the following two SQL statements:
Which statement is true regarding the outcome?
A.
Both the statements execute and give the same result
B.
Both the statements execute and give different results
C.
Only the second SQL statement executes successfully
D.
Only the first SQL statement executes successfully
Explanation:
Using the NVL2 Function
The NVL2 function examines the first expression. If the first expression is not null, the NVL2 function returns
the second expression. If the first expression is null, the third expression is returned.
Syntax
NVL2(expr1, expr2, expr3)
In the syntax:
expr1 is the source value or expression that may contain a null expr2 is the value that is returned if expr1 is not
null
expr3 is the value that is returned if expr1 is null