我创建了表格类型
create or replace TYPE NUMBER_ARRAY
AS TABLE OF NUMBER;
我希望PERIODS
变量在循环中添加值
DECLARE PERIODS NUMBER_ARRAY;
BEGIN
FOR I IN 1..10
LOOP
--I add to periods
END LOOP;
END;
答案 0 :(得分:0)
你看起来像
DECLARE
PERIODS NUMBER_ARRAY := NUMBER_ARRAY();
BEGIN
FOR I IN 1..10 LOOP
periods.extend;
periods(i) := i * 2;
END LOOP;
END;