NULL VARRAYS and NULL Elements : Varray of Number « Collections « Oracle PL/SQL Tutorial






SQL>
SQL> declare
  2    Type numberVarray is VARRAY(5)OF NUMBER;
  3    v_numvarray numberVarray;
  4  begin
  5
  6    if v_numvarray IS NULL then
  7      dbms_output.put_line('v_numvarray is null');
  8    end if;
  9
 10    v_numvarray :=NULL;
 11
 12    if v_numvarray IS NULL then
 13      dbms_output.put_line('v_numvarray is null after assignment');
 14    end if;
 15  end;
 16  /
v_numvarray is null
v_numvarray is null after assignment

PL/SQL procedure successfully completed.

SQL>








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