if sql%rowcount<=0 then raise_applycation_error(-20001,'更新失败!'); return null; end if;
if sql%rowcount != 0 then begin raise_application_error(-20001, '更新失败!') ; return null; end ; end if;
错了,是sql%rowcount == 0
begin update emp1 SET ename='adada' WHERE empno=1234; if sql%rowcount = 0 then raise_application_error(-20001, '更新失败!') ; return null; end if; end ;
begin update emp1 SET ename='adada' WHERE empno=1234; if sql%rowcount = 0 then raise_application_error(-20001, '更新失败!') ; --return null; end if; end ; ORA-20001: 更新失败! ORA-06512: 在 line 4Total execution time 0.015 sec.
begin if sql%rowcount<= 0 then raise_application_errot(-20001,'更新失败!'); end if end
raise_applycation_error(-20001,'更新失败!');
return null;
end if;
if sql%rowcount != 0 then
begin
raise_application_error(-20001, '更新失败!') ;
return null;
end ;
end if;
begin
update emp1 SET ename='adada' WHERE empno=1234;
if sql%rowcount = 0 then
raise_application_error(-20001, '更新失败!') ;
return null;
end if;
end ;
begin
update emp1 SET ename='adada' WHERE empno=1234;
if sql%rowcount = 0 then
raise_application_error(-20001, '更新失败!') ;
--return null;
end if;
end ; ORA-20001: 更新失败!
ORA-06512: 在 line 4Total execution time 0.015 sec.
if sql%rowcount<= 0 then
raise_application_errot(-20001,'更新失败!');
end if
end