buffer overflow,limit of 10000 bytes.如2#所言,缓冲区溢出,限制在10000 bytes.

解决方案 »

  1.   

    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;先取五条,运行一下,体验一把
      

  2.   

    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;
    还是提示上面一样的错误!
      

  3.   


    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;
      

  4.   

    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;