In Oracle/PLSQL, the decode function has the functionality of an IF-THEN-ELSE statement.
DECODE compares expression to each search value one by one. If expression is equal to a search, then Oracle Database returns the corresponding result. If no match is found, then Oracle returns default. If default is omitted, then Oracle returns null.
Comment