sys_refcursor返回結果集輸出方法


set serveroutput on
  declare
 v_ret sys_refcursor;
 type typ_row is record ( col_1 varchar2(100),col_2  number ,col_3 number,
   col_4  number ,col_5 number,
   col_6  number ,col_7 number,
   col_8  number ,col_9 number ,col_10 varchar2(100));
   result_temp typ_row;
 begin
    lis.Prc_CTSeasonProvince('8602','','2017-01-01','2017-12-31','01','1',v_ret);
  
           fetch v_ret into result_temp;
          
           while v_ret%found loop
        dbms_output.put_line('字段1:'||result_temp.col_1 );
       fetch v_ret   into result_temp;
    end loop;      
 end;
 /


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM