我正在尝试实现以下代码,以将学生表的credits(tot_cred)复制到数字数组中。但是数组似乎无法访问。
Create or replace procedure sort_cg ( deptname varchar) as
arr real;
len number;
begin
Select tot_cred bulk collect into arr From student Where dept_name = deptname;
for i in 1..arr.count loop
dbms_output.put_line (arr(i));
end loop;
end;
错误是:第6行错误:PL / SQL:语句被忽略