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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Triggers in SQL plus

Re: Triggers in SQL plus

From: AK <ak_tiredofspam_at_yahoo.com>
Date: 28 Nov 2004 17:49:53 -0800
Message-ID: <46e627da.0411281749.32858397@posting.google.com>


why do you need to move every modified row into another table?

Anyway, you could have just one table, EMP_BOTH, add one more column, MODIFIED
and deal mostly with 2 views
CREATE VIEW EMP AS SELECT <all the columns except for MODIFIED> FROM EMP_BOTH WHERE MODIFIED = 0
CREATE VIEW EMP_HIST AS SELECT <all the columns except for MODIFIED> FROM EMP_BOTH WHERE MODIFIED = 1 You could set MODIFIED to 0 in your insert trigger, and to 1 in you update trigger Received on Sun Nov 28 2004 - 19:49:53 CST

Original text of this message

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