DECLARE
TYPE EmpList IS TABLE OF varchar2(50) INDEX BY BINARY_INTEGER;
temp SYS_REFCURSOR;
v_temp varchar2(50);
v_emp EmpList;
BEGIN
v_emp (1) := 'gaurav';
v_emp (2) := 'manu';
open temp for select v_emp(level) from dual connect by level<=2;
loop
fetch temp into v_temp;
exit when temp%notfound;
DBMS_OUTPUT.put_line (v_temp);
end loop;
close temp;
--the below part works, then why not the above part dint works
for i in v_emp.first..v_emp.last
loop
dbms_output.put_line(v_emp(i));
end loop;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line (SQLERRM);
END;
このコレクションがここで機能しない理由を誰か教えてください??,no_data_found 例外が発生しています。