Is a varray null value : Varray of Number « Collections « Oracle PL/SQL Tutorial






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








26.6.Varray of Number
26.6.1.Defining a VARRAY
26.6.2.Initializing a VARRAY
26.6.3.NULL VARRAYS and NULL Elements
26.6.4.Is a varray null value
26.6.5.Pass NULL value to varray
26.6.6.Accessing VARRAY elements
26.6.7.Multilevel Collections