1
我在運行此代碼的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: Subscript outside of limit
ORA-06512: at line 1
非常感謝我現在解決了這個問題,我確切地得到了我的預期結果是線 –