MySQL Forums
Forum List  »  Triggers

Triggers
Posted by: sujit kondapaneni
Date: October 08, 2014 02:38PM

Hi,
Our requirement is an Insert and Update Trigger.
We have a Transactional table -A and an Interface table-B

1)When a new record is created in A we want the PK of the row to be inserted into the Interface table B.We are using "After Insert" and it is working fine.

2)The Update trigger has 2 components to it.
--when ever an update happens then Column 123(not a PK)on the transaction table has to be updated with a value lets say "Test" and then the PK of the updated row should be inserted into the Interface table B..We are using "before update"

Issue:
when ever an insert is done in the Transactional Table-A the update trigger is also firing and updating the Column 123 with the value "Test".
How do we stop this.

Your help is appreciated.

Thanks

Options: ReplyQuote


Subject
Views
Written By
Posted
Triggers
1976
October 08, 2014 02:38PM
1080
October 08, 2014 03:30PM
972
October 09, 2014 11:10AM
992
October 09, 2014 01:53PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.