在plsql 里如何执行存储过程。存储过程是正确地。我试过了。
createorreplaceprocedurecount_num(sexinchar,numoutnumber)asbeginif(sex='男')thenselect...
create or replace procedure count_num(sex in char, num out number)
as
begin
if(sex='男') then
select count(xb) into num from test where xb='男';
else
select count(xb) into num from test where xb='女';
end if;
end count_num; 展开
as
begin
if(sex='男') then
select count(xb) into num from test where xb='男';
else
select count(xb) into num from test where xb='女';
end if;
end count_num; 展开
2个回答
展开全部
DECLARE
v_num number
BEGIN
count_num( '男', v_num);
dbms_output.put_line('v_num=' || TO_CHAR(v_num));
END
v_num number
BEGIN
count_num( '男', v_num);
dbms_output.put_line('v_num=' || TO_CHAR(v_num));
END
参考资料: http://hi.baidu.com/wangzhiqing999/blog/item/0991d3124070854420a4e9b4.html
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询