GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  D2K
Go To First  |  Previous Question  |  Next Question 
 D2K  |  Question 59 of 71    Print  
What is the use of decode function?

  
Total Answers and Comments: 3 Last Update: April 09, 2009     Asked by: firoz khan 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
September 23, 2007 06:12:21   #1  
Najim Tanwir        

RE: What is the use of decode function?
Hi

Decode function is like if -- else condition.
Decode is usinfg in sql statment .
e.g

SELECT DECODE(:EMP_STATUS 'M' 'MALE' 'FEMALE') FROM EMP.

Tanwir
seven seas shipchandlers
Dubai


 
Is this answer useful? Yes | No
August 06, 2008 13:29:31   #2  
Raghu2008 Member Since: August 2008   Contribution: 9    

RE: What is the use of decode function?
The decode function is used to read the value from the given column and check 'if' the given column value and given if value is same then return the value other wise return the else value. Like this it will check the values for entire given colum.

I hope the above explenation is helpful for you if not please let me know.

Thanks
Raghu.

 
Is this answer useful? Yes | No
April 09, 2009 15:32:23   #3  
samareshp Member Since: April 2009   Contribution: 24    

RE: What is the use of decode function?
Decode(col1 value1 x
value2 y
value3 z
value4 a
Q)
it serves as if.else condition ....if col1 value1 then x elsif col1 value2 then y elsif col1 value3 then z elsif col1 value4 then y else Q......


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape