--定义包头

create or replace package 包名
as
  变量、常量声明;
  函数声明;
  过程声明;
end;


--定义包体

create or replace package body 包名
as
  函数实际代码;
  过程实际代码;
end;


create or replace package pkg_school
as 
  stucount int;
  procedure prc_getstucount;
end;


create or replace package body pkg_school
as
  procedure prc_getstucount
  as
  begin
    select count(*)
    into stucount
    from t_student;
    dbms_output.put_line('人数为:'||stucount);
  end;
end;

相关文章:

  • 2022-12-23
  • 2021-08-06
  • 2021-07-21
  • 2021-07-26
  • 2022-01-24
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-02
  • 2022-12-23
  • 2022-02-11
  • 2022-01-17
  • 2021-06-19
  • 2022-01-21
  • 2021-12-27
相关资源
相似解决方案