Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Copy Row inside a Trigger
I believe that on version 9+ that PL/SQL now supports inserting a
rowtype structure. You would however have to assign all the :old
values to the row.
Rather than writing a generic function that would create a row layout inside a trigger and use dynamic SQL to insert the row how about writing a procedure to generate the trigger code using dba_tab_columns.
Dynamic SQL should be avoided except where you have no other choice. It comes with a high parse cost and the SQL is non-sharable between different sessions. Both of these are bad conditions for the database as a whole.
HTH -- Mark D Powell -- Received on Thu Feb 03 2005 - 19:05:07 CST