Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Triggers in SQL plus
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