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 ? | 65 Yes | 2 No |
can i use dbms_output.put_line in a function u are telling as return statement
What are the return values of functions SQLCODE and SQLERRM ?
What are types of exception?
What is an oracle stored procedure?
What information is needed to connect sql*plus an oracle server?
I need to write a simple query,which one is better select statement or stored procedure?and why?
Explain the steps needed to create the scheduled job?
Which sql statement is used to delete data from a database?
How to get the procedure's, function's name from a package if it is wrapped(both spec & body).
What normalization means?
The select into statement is most often used to create backup copies of tables or for archiving records?
Explain the structure of pl/sql in brief.
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)