What is the use of decode function?

Showing Answers 1 - 9 of 9 Answers

Najim Tanwir

  • Sep 23rd, 2007
 

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

Raghu2008

  • Aug 6th, 2008
 

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.

samareshp

  • Apr 9th, 2009
 

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......

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions