标签:pkg count pac proc body roc 常量 package ace
--定义包头
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;
标签:pkg count pac proc body roc 常量 package ace
原文地址:http://www.cnblogs.com/john2017/p/6364519.html