SQL>
SQL> declare
2 Type numberVarray is VARRAY(5)OF NUMBER;
3 v_numvarray2 numberVarray;
4 begin
5 v_numvarray2 :=numberVarray(NULL);
6
7 if v_numvarray2 IS NULL then
8
9 dbms_output.put_line('v_numvarray2 is null');
10
11 else
12
13 dbms_output.put_line('v_numvarray2 is not null');
14
15 end if;
16
17 if v_numvarray2(1) IS NULL then
18
19 dbms_output.put_line('The first element of v_numvarray2 is null');
20
21 end if;
22 end;
23 /
v_numvarray2 is not null
The first element of v_numvarray2 is null
PL/SQL procedure successfully completed.
SQL>
SQL>