Mega Code Archive

 
Categories / Oracle PLSQL Tutorial / Collections
 

ORA-06531

SQL> SQL> declare   2    Type numberTableType is TABLE OF NUMBER;   3    v_numarray1 numberTableType;   4  begin   5    if v_numarray1 IS NULL then   6      dbms_output.put_line('v_numarray1 is null');   7    end if;   8    if v_numarray1(1) IS NULL then   9      dbms_output.put_line('The first element of v_numarray1 is null');  10    end if;  11  end;  12  / v_numarray1 is null declare * ERROR at line 1: ORA-06531: Reference to uninitialized collection ORA-06512: at line 8 SQL>