Re: trigger
Posted in 2004
"chaithra" <chaithra_reddy@rediffmail.com> wrote in message
news:12a29c8b.0402040501.753ca068@posting.google.com...
> hi all,
> i wanted to know if we can create more than one INSERT or DELETE
> trigger on a single table in Informix Dynamic server(IDS).
> Documentation of informix says that we can not create. cann't i create
> with different user names at least.
You should make it clear what do u want to do.
Even though Informix allows only one INSERT trigger, you can do anything
by using stored procedure. Let the INSERT trigger call a stored procedure.
Inside the stored procedure you can do without whatever you want without
any practical limit.
Also, you can use commas to separate multiple statements.
CREATE TRIGGER INS_TABLEINSERT ON TABLE1
REFERENCING NEW AS N
FOR EACH ROW ( INSERT INTO TABLE2 VALUES(n.field1),INSERT INTO TABLE3 VALUES(n.field2));
I did not check for syntax validity of the above, but I am hoping it is right.