Oracle 建立包 和 包体

--创建包
create or replace package  pac_stu
as
  type cur_stu is ref cursor;
  procedure getStu(i in number,cur_stu out cur_stu);
end pac_stu;
--创建包体
create or replace package body pac_stu
as
procedure getStu(i in number,cur_stu out cur_stu)
  as
  nums number(10);
  begin
    select count(*) into nums from stu;    
    if nums > 0 then    
      open cur_stu for select * from stu;     
    end if;   
  end getStu;
end pac_stu;
原文地址:https://www.cnblogs.com/leonkobe/p/3222059.html