我正在尝试创建一个名为动态的运行时间表,并使用批量更新将数据从表中的索引插入其中,但是当我尝试执行它时,出现了这个错误:
第 1 行出现错误:ORA-06550:第 0 行,第 0 列:PLS-00801:内部错误 [74301
]
declare
type index_tbl_type IS table of
number
index by binary_integer;
num_tbl index_tbl_type;
TYPE ref_cur IS REF CURSOR;
cur_emp ref_cur;
begin
execute immediate 'create table dynamic (v_num number)';--Creating a run time tabl
FOR i in 1..10000 LOOP
execute immediate 'insert into dynamic values('||i||')';--run time insert
END LOOP;
OPEN cur_emp FOR 'select * from dynamic';--opening ref cursor
FETCH cur_emp bulk collect into num_tbl;--bulk inserting in index by table
close cur_emp;
FORALL i in num_tbl.FIRST..num_tbl.LAST --Bulk update
execute immediate 'insert into dynamic values('||num_tbl(i)||')';
end;