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 linq to sql?
What is a function in oracle pl sql?
What are different functions in sql?
What is normalization in a database?
What is oracle sql called?
How is sql used in oracle?
How to Execute a Package in PL/SQL.?
What are all the ddl commands?
How do I debug a stored procedure?
What is the maximum size of sqlite database?
What is a dynamic query?
How do I count records in sql?
Mention what are the benefits of pl/sql packages?
Is sql similar to python?
What is left join in postgresql?