SQL> declare
2 Type numberVarray is VARRAY(5)OF NUMBER;
3 v_numvarray numberVarray;
4 begin
5 v_numvarray :=numberVarray(10,20,30,40);
6
7
8 dbms_output.put_line(to_char(v_numvarray(1))||', '||to_char(v_numvarray(2))||', '||to_char(v_numvarray(3))||', '||to_char(v_numvarray(4)));
9
10 v_numvarray(4):=60;
11
12 dbms_output.put_line(to_char(v_numvarray(1))||', '||to_char(v_numvarray(2))||', '||to_char(v_numvarray(3))||', '||to_char(v_numvarray(4)));
13 end;
14 /
10, 20, 30, 40
10, 20, 30, 60
PL/SQL procedure successfully completed.
SQL>
SQL>
|