MySQL Forums
Forum List  »  Triggers

DB to DB Trigger
Posted by: Dan Hooley
Date: September 30, 2011 09:51AM

I'm trying to set up a trigger to update a table in another database with the value from the table in this database. Here's my code so far, but doesn't work:

BEGIN
if new.ListID <> old.ListID then
update bebmain.a_entities_qblink set ListID = new.ListID where ListID = old.ListID;
end if;
END

What I want is if the ListID column changes, I want the ListID in the table in the other database to reflect the change, if there is a matching record in that table.

Options: ReplyQuote


Subject
Views
Written By
Posted
DB to DB Trigger
3143
September 30, 2011 09:51AM
1156
October 03, 2011 05:49PM
1325
October 04, 2011 09:38AM
1033
October 06, 2011 04:19PM


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.