MySQL Forums
Forum List  »  Triggers

Re: Updating a row from another table - trigger/procedure or function ?
Posted by: Peter Brawley
Date: September 22, 2009 10:54AM

Is this what you mean?
CREATE TRIGGER update_current_address
AFTER UPDATE ON migration
FOR EACH ROW BEGIN
  IF NEW.done = 1 THEN
    UPDATE client SET current_address=OLD.new_address WHERE cID=OLD.cID;
  END IF;
END;

PB
http://www.artfulsoftware.com

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Updating a row from another table - trigger/procedure or function ?
2948
September 22, 2009 10:54AM


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.