Multiple choice technology databases

IF-THEN-ELSE-ENDIF construct is used for conditional control in a PL/SQL block. What happens if the condition in IF-THEN-ELSE-ENDIF block evaluates to NULL?

  1. The SQL statements in the IF condition are processed.

  2. The SQL statements in the ELSE condition are processed.

  3. IF-THEN-ELSE-ENDIF construct is skipped.

  4. The SQL statements in the IF condition as well as ELSE condition are processed.

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

When the IF condition evaluates to NULL in PL/SQL, it's treated as FALSE and the entire IF-THEN-ELSE construct is skipped - neither the IF nor ELSE blocks execute. PL/SQL doesn't process NULL as a separate logical state in conditional constructs.