RE: Trigger Question
Posted in 2001
Yes, you can. I don't have the exact syntax with me, but you can create an
update trigger.
Have a look in the manuals for the exact syntax -
It will be something in the line of -
create trigger backup_a update on table_A (column1, column2) referencing
old as p_old, new as p_new
for each row
(
insert into a_back values (p_old.column1, p_old.column2)
);
HTH
Dirk
-----Original Message-----
From: owner-informix-list@iiug.iiug.org
[mailto:owner-informix-list@iiug.iiug.org]On Behalf Of
da_cohen@netvision.net.il
Sent: Friday, January 26, 2001 11:25 AM
To: informix-list@iiug.org
Subject: Trigger Question
Hi,
Is there anyway for duplicate a record, using triggers, from one table
to another table in case of any changes in the first table?
Let say I have a table 'A' with two fields and another table, 'A_back'
with the exact two fields.
When there is a change in one of the records of table 'A', I would like
to copy the record with it's new values to table A_back.
Thanks
Sent via Deja.com
http://www.deja.com/