What is DECODE function?

Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.

What is DECODE function?

Rating:

The DECODE function decodes a column value or an expression and compares it with each specified search value, one by one. If the expression matches a search value, a result value corresponding to the matching search value is returned. If no match is found, a default result value, if included, is returned. However, if no default value is included, a NULL value is returned. The DECODE function is one of the few single-row functions that directly deal with NULL values. It can compare two NULL values and can return a NULL value.

Syntax:

DECODE (ColumnExpression, search, result[, search, result, ...] [, default] )

ColumnExpression, search, and result can be of the CHAR, VARCHAR2, NCHAR, or NVARCHAR2 datatype.


Rating:



Other articles

Click here to Article home

 
uCertify.com | Our Company | Articles | Privacy | Security | Contact Us
MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD Cisco Certification: CCNA, CCENT, A+, Network+, Security+
Oracle Certification: OCP 9i, OCP 10g, OCA 9i, OCA 10g CIW foundation    EC-212-32    CISSP    Photoshop ACE    Adobe Flash ACE
© 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.