Oracle PL/SQL:将整个行从触发器转发到过程 [英] Oracle PL/SQL: Forwarding whole row to procedure from a trigger
问题描述
具有一个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)
推荐答案
这不可能.
也许 查看全文