Multiple choice technology databases

Suppose in the declaration section of a PL/SQL block, you create but do not initialize a NUMBER variable. What will be the initial value of the variable when the block is executed?

  1. 0

  2. NULL

  3. Depends on the scale and precision of the datatype.

  4. Without initialization, a variable cannot be used in the executable section of the block.

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

In PL/SQL, variables that are declared but not initialized default to NULL when execution begins. They do not default to 0, their default value does not depend on scale/precision, and they can still be used in the executable section.