对于这个,找不到数据他直接就异常了,表面上看好像也没问题,走异常也能理解,以下是我的测试存过
create or replace procedure p_test_exception(i_prm varchar2)
as
v_username varchar2(10);
begin
select a.uname into v_username from t_test_staff1 a
where a.staffid=i_prm
;
if SQL%NOTFOUND then
insert into t_test_staff1(staffid) values (i_prm);
end if;
commit;
end ;
相关分类