Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Copy Row inside a Trigger

Re: Copy Row inside a Trigger

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 3 Feb 2005 17:05:07 -0800
Message-ID: <1107479107.517161.162830@f14g2000cwb.googlegroups.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US