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 get help at the sql prompt?

1053


explain advantages of myisam over innodb? : Sql dba

1015


what are the advantages of using stored procedures? : Sql dba

1059


Can a varchar be a primary key?

953


Which are the different case manipulation functions in sql?

953


what is the difference between inner and outer join? Explain with example. : Sql dba

971


Mention what is the plv (pl/vision) package offers?

1055


Can dml statements be used in pl/sql?

1018


Can you join a table to itself?

1029


How can you fetch common records from two tables?

1000


Is json a nosql?

914


What is a join?

1020


What are packages in pl sql and also explain its advantages?

959


What is meant by user defined function?

985


What are dml commands?

939