Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Triggers to intercept/undo harmful updates
Hello,
I am trying to "intercept" (and negate) harmful updates to a certain table. I have a (powerbuilder) front-end that seems to partially ignore my "where" clause and do a blanket "set" on a column from value A to value B. I would like to "undo" the update through Oracle 7.0.15 (Server) until a fix can be made to the front-end.
So, I'm thinking about a trigger like this:
CREATE TRIGGER undo
BEFORE UPDATE OF status ON table FOR EACH ROW WHEN (old.status = 'C') BEGIN :new.status := 'C'; END;
Will this work?
Stephen Clarke Received on Thu Dec 19 1996 - 00:00:00 CST