Oracle PL/SQL: Forwarding whole row to procedure from a trigger(Oracle PL/SQL:将整行从触发器转发到过程)
问题描述
有一个 Oracle (10i) PL/SQL 行级触发器,它负责三个独立的任务.由于触发器在这种情况下相对混乱,我想将这三个任务导出到三个存储过程中.我正在考虑使用 my_table%ROWTYPE
参数或过程的集合类型,但我主要关心的是如何填充这些参数.
In have an Oracle (10i) PL/SQL Row-Level trigger which is responsible for three independent tasks. As the trigger is relatively cluttered that way, I want to export these three tasks into three stored procedures.
I was thinking of using a my_table%ROWTYPE
parameter or maybe a collection type for the procedures, but my main concern is how to fill these parameters.
有没有办法轻松地将触发器的整个 :NEW
行放入单个变量中?到目前为止,我能找到的唯一方法是将每个字段单独分配给不太令人满意的变量,查看代码维护等.
Is there a way to put the whole :NEW
row of a trigger into a single variable easily?
So far the only way I could find out was assigning each field separately to the variable which is not quite satisfying, looking at code maintenance etc.
类似的东西
SELECT :NEW.* INTO <variable> FROM dual;
将是首选.(实际上我还没有尝试过,但我想它不会起作用)
would be preferred. (I haven't tried that actually but I suppose it wouldn't work)
推荐答案
这不可能.
也许 我对另一个问题的回答 可以提供帮助.
Maybe my answer to another question can help.
这篇关于Oracle PL/SQL:将整行从触发器转发到过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Oracle PL/SQL:将整行从触发器转发到过程


基础教程推荐
- CHECKSUM 和 CHECKSUM_AGG:算法是什么? 2021-01-01
- 使用 VBS 和注册表来确定安装了哪个版本和 32 位 2021-01-01
- MySQL根据从其他列分组的值,对两列之间的值进行求和 2022-01-01
- ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和 2021-01-01
- 从字符串 TSQL 中获取数字 2021-01-01
- 带更新的 sqlite CTE 2022-01-01
- 带有WHERE子句的LAG()函数 2022-01-01
- 如何在 CakePHP 3 中实现 INSERT ON DUPLICATE KEY UPDATE aka upsert? 2021-01-01
- while 在触发器内循环以遍历 sql 中表的所有列 2022-01-01
- MySQL 5.7参照时间戳生成日期列 2022-01-01