--使用type定义二唯数组
declare
type iCountType is table of integer index by binary_integer;
i number;
j number := 5;
icount iCountType;
jcount iCountType;
begin
--初始化
icount(1) := 1;
jcount(1) := 1;
for i in 2 .. j
--初始化 5*2 的二唯数组
loop
icount(i) := icount(i - 1) * 10;
jcount(i) := jcount(i - 1) * 20;
end loop;
for i in 2 .. j
loop
dbms_output.put_line(icount(i)||','||jcount(i));
end loop;
end;
declare
type iCountType is table of integer index by binary_integer;
i number;
j number := 5;
icount iCountType;
jcount iCountType;
begin
--初始化
icount(1) := 1;
jcount(1) := 1;
for i in 2 .. j
--初始化 5*2 的二唯数组
loop
icount(i) := icount(i - 1) * 10;
jcount(i) := jcount(i - 1) * 20;
end loop;
for i in 2 .. j
loop
dbms_output.put_line(icount(i)||','||jcount(i));
end loop;
end;