assignments to nested table elements, and the ORA-6533 error.
SQL>
SQL> DECLARE
2 TYPE NumbersTab IS TABLE OF NUMBER;
3 v_Numbers NumbersTab := NumbersTab(1, 2, 3);
4 BEGIN
5 -- v_Numbers was initialized to have 3 elements. So the
6 -- following assignments are all legal.
7 v_Numbers(1) := 7;
8 v_Numbers(2) := -1;
9
10 -- However, this assignment will raise ORA-6533.
11 v_Numbers(4) := 4;
12 END;
13 /
DECLARE
*
ERROR at line 1:
ORA-06533: Subscript beyond count
ORA-06512: at line 11
SQL>
SQL>
Related examples in the same category