Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 ?    65 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create an array in pl/sql?

1121


what is a tablespace? : Sql dba

1101


Which is faster view or stored procedure?

1009


What are records give examples?

1051


Why are cursors used?

1174


What are the dml statements?

1196


Do prepared statements prevent sql injection?

996


How to rename a column in the output of sql query?

1124


what is the difference between clustered and non clustered index in sql? : Sql dba

1188


explain advantages of myisam over innodb? : Sql dba

1111


What is the difference between delete and truncate statement in sql?

1126


How does cross join work?

1006


How do I restart sql?

1024


What are the two parts of design view?

1062


What is query execution plan in sql?

1247