--创建包
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;

相关文章:

  • 2022-01-16
  • 2021-05-06
  • 2022-12-23
  • 2022-12-23
  • 2021-07-27
  • 2022-12-23
  • 2021-10-20
  • 2021-07-10
猜你喜欢
  • 2021-07-04
  • 2022-12-23
  • 2021-07-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案