Oracle 带输出参数的存储过程如何调用? 5
createorreplaceproceduretotal(minAgeinnumber,maxAgeinnumber,totaloutnumber)isbeginsel...
create or replace procedure total(minAge in number, maxAge in number, total out number) is
begin
select count(*) into total from person where age between minAge and maxAge;
end;
/
--调用方式一:
declare
count_ number;
begin
total(10, 30, count_);
dbms_output.put_line(count_);
end;
/ 展开
begin
select count(*) into total from person where age between minAge and maxAge;
end;
/
--调用方式一:
declare
count_ number;
begin
total(10, 30, count_);
dbms_output.put_line(count_);
end;
/ 展开
1个回答
展开全部
create or replace procedure detail_cs(a in number, b out number) is
begin
select 1+a into b from dual;
end detail_cs;
create or replace procedure call_test(a1 in number, b1 out number) is
begin
detail_cs(a1,b1);
end call_test;
begin
select 1+a into b from dual;
end detail_cs;
create or replace procedure call_test(a1 in number, b1 out number) is
begin
detail_cs(a1,b1);
end call_test;
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询