日期:2014-05-17  浏览次数:20715 次

▲▲▲用过PL/SQL(存储过程及游标)的人进来▲▲▲
declare  
    type   cursorType   is   ref   cursor;    
    v_cur   cursorType;
begin
    getemps(v_cur);
    /*各位朋友,我想在这个位置,循环取出游标中的值,请问如何写?*/
end;

其中过程getemps代码如下
  create   or   replace   procedure   getemps(   p_cursor   in   out   types.cursorType   )    
    as    
    begin    
                open   p_cursor   for   select   id,   title   from   cf_news   order   by   id;--表的名字    
    end;

------解决方案--------------------
声明v_id,v_title,再加
LOOP
FETCH v_cur INTO v_id,v_title;
EXIT WHEN v_cur%NOTFOUND;

------解决方案--------------------
fetch