摆脱插入触发器 [英] getting rid of Insert trigger
本文介绍了摆脱插入触发器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尝试探索替代使用插入触发器的解决方案。类似于基于API的方法,以及不同方法的优点和缺点。
Trying to explore solutions alternative to using insert triggers. Like API based ones and pros and cons with different approaches.
推荐答案
在API方法中,您将创建一个过程来执行这两个操作 - 类似:
In an API approach you would create a procedure to perform both operations - something like:
package body emp_api is
procedure insert_emp (...) is
begin
insert into emp (...) values (...);
-- Insert that was previously in trigger
insert into other_table (...) values (...);
end;
end;
然后,您可以强制应用程序使用API,方法是向其授予EXECUTE访问权限api包,但没有INSERT / UPDATE / DELETE访问表。
Then you force applications to use the API by giving them EXECUTE access to the api package but no INSERT/UPDATE/DELETE access to the tables.
这篇关于摆脱插入触发器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文