2. 做为参数传递记录集
   type empcurtyp is ref cursor return emp%rowtype;
   procedure open_emp_cv(emp_cv in out empcurtyp) is 
     .............   
     open emp_cv for sele_statament
     loop
          fetch emp_cv into emp_rec 
            ...........
    exit when ....
     end loop
     close emp_cv

解决方案 »

  1.   

    1.
    open rcType for'select * from aa';,可以作为参数传出
    2.不可以
    二者的区别是1是一种游标的类型,像varchar2一样,但是2时一个游标的记录集
      

  2.   

    type rcType is Ref Cursor 是定义一种类型!使用的时候,还要声明:rcCursor rcType;
    open rcCursor for select ...............cursor rcType is select..........定义游标变量!相当于如上两句!