raise_application_error:
create or replace trigger test_trigger
before insert or update or delete
on test
begin
raise_application_error('-20002', 'you can not change the data !');
end;
create procedure myPro(mun int,outPam out varchar2)
is
begin
select name from myTable where id = num into outPam;
Exception
raise_application_error('-20002', 'you can not change the data !');
end;
本文介绍了一个Oracle数据库中的示例,其中包括使用PL/SQL创建触发器以阻止数据更改的实现方式,以及创建存储过程从表中检索数据的方法,并通过异常处理确保了操作的安全性。
924

被折叠的 条评论
为什么被折叠?



