SQL>
SQL> DECLARE
2 TYPE Numbers IS VARRAY(20) OF NUMBER(3);
3 v_NullList Numbers;
4 v_List1 Numbers := Numbers(1, 2);
5
6 v_List2 Numbers := Numbers(NULL);
7 BEGIN
8 IF v_NullList IS NULL THEN
9 DBMS_OUTPUT.PUT_LINE('v_NullList is NULL');
10 END IF;
11
12 IF v_List2(1) IS NULL THEN
13 DBMS_OUTPUT.PUT_LINE('v_List2(1) is NULL');
14 END IF;
15 END;
16 /
v_NullList is NULL
v_List2(1) is NULL
PL/SQL procedure successfully completed.
SQL>
SQL>
|