oracle 创建游标

来源:互联网 发布:淘宝销量最好的店铺 编辑:程序博客网 时间:2024/06/05 14:24


create or replace package mypackt is
  type myCursor is ref cursor;
  end mypackt;
create or replace procedure getDept(v_deptno dept.deptno%type
                                                                    v_cursor out mypackt.myCursor) is
begin
open v_cursor for
     select * from dept where deptno=v_deptno;
  end getDept;