Oracle Database: Program with PL/SQL — Question 10

Examine this code:
CREATE TYPE list_typ IS TABLE OF NUMBER;
/

DECLARE -
l_list list_typ := list_typ ();
Which two executable sections will display the message TRUE?

Answer options

Correct answer: B, E

Explanation

The correct answers B and E will display TRUE because B checks if the first item is NULL after extending the list, and E checks if the first item equals 1. Options A and D will not output TRUE as they check conditions that do not apply to an empty list, and C incorrectly checks if the list is empty after extending it.