Computer Science, asked by surekhabattacse, 5 months ago

Q3 - For some particular assignment, you need to compare two values, if both are
equal, the result would be null, and if the values are not equal then the first value
should be returned. Which function should you use?
A- NVL
B- NVL2
C - NULLIE
D-COALESCE​

Answers

Answered by patelateeq
3

Answer:

b is the correct answer don'thank

Answered by Jasleen0599
0

Option B) NVL2

For some particular assignment, you need to compare two values, if both are equal, the result would be null, and if the values are not equal then the first value should be returned. Which function should you use NVL2.

  • With NVL2, you can base a query's result value on whether or not a specified expression is null. In the event that expr1 is not null, NVL2 returns expr2. When expr1 is null, NVL2 returns expr3, not expr1. Any datatype may be used for the parameter expr1.
  • Return the second expression if the first expression is not null. Return the third expression if the first expression is null. The first expression is open to any kind of data.
  • Three arguments can be passed to the Oracle NVL2() function. It returns the second argument if the first argument is not null. It returns the third argument if the second argument is null.
  • The first expression is examined by the NVL2 function. The NVL2 function returns the second expression if the first expression is not null. The third expression, i.e., is returned if the first expression is null. expr2 is returned by NVL2 if expr1 is not null. NVL2 returns expr3 if expr1 is null. Any data type may be present in the argument expr1.

#SPJ2

Similar questions