存储过程入门例子

创建存储过程:

create or replace procedure test (
p1 in out number,p2 in number,r1 out number,r2 out number) as
begin
r1 := p1 + p2;
r2 := p1 - p2;
p1 := 888;
end test;

执行:

declare
p1 number(3) :=10;

begin
test(p1,p1,p1,p1);
dbms_output.put_line('a + b = ' || p1);
end;

posted @ 2018-06-07 10:19  余***龙  阅读(150)  评论(0编辑  收藏  举报