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 |
Why use triggers in sql?
What are its different types of dbms?
Suppose There is a string A.B....C.......D.........E........F In this string dots (.) are not having fixed count in between of string. I want the output to have string with one dot between. I.e. A.B.C.D.E.F
what is 'mysqlimport'? : Sql dba
Can we rollback truncate?
Explain aggregate functions are available there in sql?
What are % TYPE and % ROWTYPE ? What are the advantages of using these over datatypes?
is mysql query is case sensitive? : Sql dba
How to Execute a Package in PL/SQL.?
What is a schema sql?
How can I see all tables in sql?
What is dynamic sql in pl sql?