MySQL Forums
Forum List  »  Triggers

Trigger Help
Posted by: Derek Meyer
Date: June 02, 2015 10:22AM

I trying to figure out the trigger format for something like the following.. I have done basic triggers previously but Im not sure if this can be done..

use db1;
delimiter //
CREATE TRIGGER test BEFORE UPDATE on db1.table1
FOR EACH ROW
BEGIN
IF NEW.field = 'CLOSED' THEN
SET db2.table2.field ='' where db1.table1.field = db2.table2.field;

END IF;
END;//

Options: ReplyQuote


Subject
Views
Written By
Posted
Trigger Help
1929
June 02, 2015 10:22AM
991
June 02, 2015 12:57PM


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.