Oracle PL/SQL: Forwarding whole row to procedure from a trigger

Viewed 15239

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.

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.

Something like

SELECT :NEW.* INTO <variable> FROM dual;

would be preferred. (I haven't tried that actually but I suppose it wouldn't work)

4 Answers
Related