导航

学习oracle存储过程

Posted on 2017-05-02 11:16  Dom988  阅读(91)  评论(0)    收藏  举报


--创建存储过程
create or replace procedure BCPS.getApplyDate(applyno varchar2)
as
a_date date;
begin
select applyDate into a_date from apply where applyno=applyno;
exception
when no_data_found then
raise_application_error(2017,'没有数据');
end;

--执行存储过程
exec getApplyDate('IWS_00000695')

--删除存储过程
drop procedure getApplyDate