n.b.:https://oracle-base.com/articles/8i/collections-8i#index-by-tables
Oracle uses collections in PL/SQL the same way others languages use arrays. Oracle provices three basic collections,
each with an assortment of methods,
1.Index-by Tables
2.Nested Table
3.Varry
1.Index-by Tables:
i. No upper bounds
ii. the collection is indexed using BINARY_INTEGER
SET SERVEROUTPUT ON ;
Declare
Type arr_number is table of number index by BINARY_INTEGER;
v_empno arr_number;
v_index number;
v_count number:=0;
begin
for i in 1..5 loop
v_empno(i):= i;
v_count := i;
end loop;
for j in 1..v_count loop
dbms_output.put_line (v_empno(j));
end loop;
end;
2.Nested Table
...
3.Varry
...
Oracle uses collections in PL/SQL the same way others languages use arrays. Oracle provices three basic collections,
each with an assortment of methods,
1.Index-by Tables
2.Nested Table
3.Varry
1.Index-by Tables:
i. No upper bounds
ii. the collection is indexed using BINARY_INTEGER
SET SERVEROUTPUT ON ;
Declare
Type arr_number is table of number index by BINARY_INTEGER;
v_empno arr_number;
v_index number;
v_count number:=0;
begin
for i in 1..5 loop
v_empno(i):= i;
v_count := i;
end loop;
for j in 1..v_count loop
dbms_output.put_line (v_empno(j));
end loop;
end;
2.Nested Table
...
3.Varry
...