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 where rownum<=5; loop fetch p_cur into v_name; dbms_output.put_line(v_name); end loop; end test;先取五条,运行一下,体验一把
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; dbms_output.put_line(v_name); end loop; end test; 还是提示上面一样的错误!
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;
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;
v_name varchar2(2000);
TYPE type_cursorsss IS REF CURSOR;
p_cur type_cursorsss;
begin
open p_cur for
select NAME from AA where rownum<=5;
loop
fetch p_cur into v_name;
dbms_output.put_line(v_name);
end loop;
end 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;
dbms_output.put_line(v_name);
end loop;
end test;
还是提示上面一样的错误!
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;
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;