create or replace procedure A(i out number,j out number,k in number,l in varchar2)
is
o NUMBER(5):=0;begin
if k=10 then o:=11;
end if;
if k=20 then o:=21;
end if;
select count(*) into i from m
where round((sysdate-savetime)*24*60)<=l
AND type=k;
select count(*) into j from m
where round((sysdate-savetime)*24*60)<=l
AND STYPE=o;
COMMIT;
end A;
大家好,请问在这个存储过程中,为什么当k为10与k为20时,输出的值i都是相同的?里面是不是存有什么问题?
is
o NUMBER(5):=0;begin
if k=10 then o:=11;
end if;
if k=20 then o:=21;
end if;
select count(*) into i from m
where round((sysdate-savetime)*24*60)<=l
AND type=k;
select count(*) into j from m
where round((sysdate-savetime)*24*60)<=l
AND STYPE=o;
COMMIT;
end A;
大家好,请问在这个存储过程中,为什么当k为10与k为20时,输出的值i都是相同的?里面是不是存有什么问题?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货