create or replace procedure test is
v_name varchar2(2000);
TYPE type_cursorsss IS REF CURSOR;
p_cur type_cursorsss;
begin
open p_cur for
select NAME from AA;
loop
fetch p_cur into v_name;
dbms_output.put_line(v_name);
end loop;
end test;
执行时提示

刚接触oracle还望大师们帮忙解惑一下。
------解决方案--------------------
create or replace procedure test
is
v_name varchar2(500);
TYPE type_cursorsss IS REF CURSOR;
p_cur type_cursorsss;
begin
open p_cur for
select NAME from AA where id<2;
loop
fetch p_cur into v_name;
exit when p_cur%notfound;
dbms_output.put_line(v_name);
end loop;
end test;