Multiple choice technology programming languages

In a PL/SQL block, a variable is declared as NUMBER without an initial value. What will its value be when it is first used in the executable section of the PL/SQL block?

  1. NULL

  2. 0

  3. Results in a compilation error

  4. An exception will be raised

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In PL/SQL, variables declared without initialization are assigned NULL by default, unlike some languages where primitives default to zero. NULL is a valid value in Oracle, distinct from 0 or empty string. The code compiles successfully; no error occurs until runtime operations on NULL.