SQL>
SQL> DECLARE
2 TYPE NumbersTab IS TABLE OF NUMBER;
3
4 v_Tab1 NumbersTab := NumbersTab(-1);
5
6 v_Primes NumbersTab := NumbersTab(1, 2, 3, 5, 7);
7
8 v_Tab2 NumbersTab := NumbersTab();
9 BEGIN
10 v_Tab1(1) := 12345;
11
12 FOR v_Count IN 1..5 LOOP
13 DBMS_OUTPUT.PUT(v_Primes(v_Count) || ' ');
14 END LOOP;
15 DBMS_OUTPUT.NEW_LINE;
16 END;
17 /
1 2 3 5 7
PL/SQL procedure successfully completed.
SQL>
SQL>
|