Difference between NVL, NVL2 and NULLIF
Answer / 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 |
What is identity column in sql server?
Can you do multiple joins in sql?
Does postgresql run on the cloud?
how would you write a query to select all teams that won either 2, 4, 6 or 8 games? : Sql dba
What is primary key and foreign key with example?
How to select all records from the table?
What is the use of procedures?
how to delete duplicate rows from a specified table(only single table) how do you know which join is need to be used
How can we implement rollback or commit statement in a trigger?
What is crud sql?
what is 'force view'?
How can we connect an Android App to an Oracle database and use the PL/SQL procedural code?