包 过程 函数
create or replace package haha1
is
function fndiv(a int,b int) return float;
procedure add(a int,b int);
end;
create or replace package body haha1
is
function fndiv(a int,b int) return float
as
begin
return a*1.0/b;
end;
procedure add(a int,b int)
as
c int;
begin
c:=a+b;
dbms_output.put_line(c);
end;
end;
select haha1.fndiv(10,20) from dual
begin
haha1.add(10,haha1.fndiv(10,20));
end;
posted on 2015-10-27 16:11 kebizhanmushi 阅读(100) 评论(0) 编辑 收藏 举报