Difference between NVL, NVL2 and NULLIF
Answer Posted / sushma s
NVL function substitute a value when a null value is
encountered.
NVL2: substitutes a value when a null value is encountered
as well as when a non-null value is encountered.
The syntax for the NVL2 function is:
NVL2( string1, value_if_NOT_null, value_if_null )
string1 is the string to test for a null value.
value_if_NOT_null is the value returned if string1 is not null.
value_if_null is the value returned if string1 is null.
NULLIF: NULLIF function compares expr1 and expr2. If expr1
and expr2 are equal, the NULLIF function returns NULL.
Otherwise, it returns expr1.
Is This Answer Correct ? | 64 Yes | 2 No |
Post New Answer View All Answers
What is a stored procedure in sql with example?
Is left join inner or outer by default?
What is the basic structure of an sql?
What does sign mean sql?
Which software is used for pl sql programming?
What does select top 1 do in sql?
what are enums used for in mysql? : Sql dba
What is sqlservr exe?
What is the use of pl/sql table?
how would you get the current date in mysql? : Sql dba
why does the selected column have to be in the group by clause or part of an aggregate function? : Sql dba
Under what condition it is possible to have a page level lock and row lock at the same time for a query? : Transact sql
What is trigger explain it?
what are integrity rules?
Write a query to find the names of users that begin with "um" in sql?