ALL scalar functions in Oracle return null when given a null argument
-
True
-
False
Scalar functions like NVL, COALESCE, NVL2, and DECODE specifically handle null arguments without returning null. They're designed to substitute or evaluate based on null presence. Only functions like LENGTH, SUBSTR, or CONCAT return null when input is null.
This statement is false because Oracle has scalar functions that explicitly handle nulls without simply propagating them: NVL, NVL2, and COALESCE are designed specifically to substitute a non-null value when the input is null, so they return the substitute value, not null. Similarly, concatenation-related functions and CASE/DECODE-driven expressions can be built to return non-null results for null inputs. Since these clear counterexamples exist, the blanket claim that 'ALL scalar functions... return null when given a null argument' is false - it's true for many arithmetic/string functions (e.g., UPPER(NULL) is null), but not for the whole scalar function library, which is exactly why 'False' is correct.