ORACLE存储过程语法
时间:2021-07-01 10:21:17
帮助过:5人阅读
or replace procedure Vid_UnRegStateNoCharging
(
pTelno in varchar2,
pClass in number,
pVid in out
varchar2,
pAgent in varchar2,
pRole in varchar2,
pRe out number,
pDesc out varchar2
)
is
tTmpNum number:
=0;
tVidOnUnRegReNotes number:
=0;
begin
select count(
*)
into tTmpNum
from t_online
where TELNO
= pTelno;
if(tTmpNum
< 1)
then
select count(
*)
into tVidOnUnRegReNotes
from T_UNREG_LOG
where TELNO
= pTelno ;
if(tVidOnUnRegReNotes
>1)
then
pRe :=10;
pDesc:=‘用户已注销,无法计费.‘;
return;
end if;
end if;
commit;
pRe :=0;
pDesc :=‘正常‘;
return;
end Vid_UnRegStateNoCharging;
存储过程里可以有一些逻辑判断,也可以存储过程调用存储过程,上面的In 代表输入参数,out代表输出参数。
ORACLE存储过程语法
标签: