.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> Sql Server >> Post New QuestionBookmark and Share Subscribe to Forum

NVL function in Oracle

Posted By: Dhivakaran     Posted Date: October 26, 2010    Points:2   Category :Sql Server
What is NVL function in oracle?

Responses
Author: Asha.MP             
Posted Date: October 26, 2010     Points: 5   

Hi..
There is a table with the name TabEx in Oracle,Two columns are there in TabEx table as "Name" and "age".The data is
asha,20
usha,10
ashok
means there is no age for Ashok.
if I use below query
select name,NVL(age,11) from TabEx
i will get the result as
asha,20
usha,10
ashok,11
because if we use NVL(age,11), it will check the age field if that field is null
it will disply it as 11.

Thanks and Regards,
Asha.mp
Author: Deepika Haridas             
Posted Date: October 27, 2010     Points: 5   

Hi,

NVL function actually converts your null value to value specified which then becomes its actual value.

For example,

NVL(hire_date,'01-JAN-99')


Here hire_date will be assigned to 01-JAN-99 where it is NULL




Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend