SQL>
SQL> declare
2 Type numberVarray is VARRAY(5)OF NUMBER;
3
4 v_numvarray1 numberVarray;
5
6 begin
7
8 if v_numvarray1 IS NULL then
9
10 dbms_output.put_line('v_numvarray1 is null');
11
12 end if;
13
14 if v_numvarray1(1) IS NULL then
15
16 dbms_output.put_line('The first element of v_numvarray1 is null');
17
18 end if;
19
20 end;
21 /
v_numvarray1 is null
declare
*
ERROR at line 1:
ORA-06531: Reference to uninitialized collection
ORA-06512: at line 14
|