我在运行此代码的cmd中尝试了几次,但每次在Declare的第1行说出超出限制的下标但我还没有发现任何问题 我该怎么办?
declare
type namesarray is varray(5) of varchar2(10);
type grades is varray(5) of integer;
names namesarray;
marks grades;
total integer;
begin
names := namesarray('Pronab','Kavita','Pritam','Ayan','Bpl');
marks := grades(96,96,97,93,92,90);
total := names.count;
dbms_output.put_line('Total ' || total || 'Students' );
for i in 1..total loop
dbms_output.put_line('Student: ' || names(i) || 'Marks' || marks(i));
end loop;
end;
/
ERROR:
ORA-06532:超出限制的下标
ORA-06512:第1行