Triggers for update
Posted in 2003
Topics: Triggers, Constraints & Referential Integrity
I would like to know if it is possible referencing
values of a SQL clause in a trigger.
For example, if I get this SQL
UPDATE table1 SET colum1=X, column2=Y WHERE conditionHow can I make reference to values x and y in a procedure, for example:
CREATE TRIGGER triggerx UPDATE OF column3 ON table1BEFORE
(EXECUTE PROCEDURE procedurex(X,Y))
Thank you in anticipation.
Not in the BEFORE trigger (or the AFTER trigger), but you can in the EVERY
ROW trigger. RTFM?
--
Jonathan Leffler (jleffler@us.ibm.com)
STSM, Informix Database Engineering, IBM Data Management Solutions
4100 Bohannon Drive, Menlo Park, CA 94025
Tel: +1 650-926-6921 Tie-Line: 630-6921
"I don't suffer from insanity; I enjoy every minute of it!"
"ELENA GROVER"
<mgroveres@yahoo. To: ids@iiug.org
com> cc:
Sent by: Subject: Triggers for update [219]
forum.subscriber@
iiug.org
02/03/2003 02:44
PM
I would like to know if it is possible referencing values of a SQL clause
in a trigger.
For example, if I get this SQL
UPDATE table1 SET colum1=X, column2=Y WHERE conditionHow can I make reference to values x and y in a procedure, for example:
CREATE TRIGGER triggerx UPDATE OF column3 ON table1BEFORE
(EXECUTE PROCEDURE procedurex(X,Y))
Thank you in anticipation.