What is DECODE function?
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.
ColumnExpression, search, and result can be of the CHAR, VARCHAR2, NCHAR, or NVARCHAR2 datatype.
Rating:
Other articles
- Things to practice for Oracle test 1Z0-007.
- What are the restrictions pertaining to the use of an outer join?
- What is schema?
- How is top-n analysis performed?
- What is an inline view?