Pleae मुझे यह समझने में सहायता करें कि दूसरा ब्लॉक त्रुटि क्यों फेंक रहा है लेकिन पहला ब्लॉक चल रहा है। दोनों जगहों की सीमा घोषित आकार (41) से कम है।ORA-06532: सीमा के बाहर सदस्यता
Declare
Type typ_int_array IS VARRAY(41) OF NUMBER;
v_typ_int_array typ_int_array := typ_int_array(10,20,30,40);
BEGIN
SYS.DBMS_OUTPUT.PUT_LINE(v_typ_int_array(1));
v_typ_int_array.extend(6);
v_typ_int_array(6) := 60;
END;
Declare
Type typ_int_array IS VARRAY(41) OF NUMBER;
v_typ_int_array typ_int_array := typ_int_array(10,20,30,40);
BEGIN
SYS.DBMS_OUTPUT.PUT_LINE(v_typ_int_array(1));
v_typ_int_array.extend(38);
v_typ_int_array(38) := 60;
END;
अपवाद:
**Error :**
Error report -
ORA-06532: Subscript outside of limit
ORA-06512: at line 6
06532. 00000 - "Subscript outside of limit"
*Cause: A subscript was greater than the limit of a varray
or non-positive for a varray or nested table.
*Action: Check the program logic and increase the varray limit
if necessary.
10