MySQL Forums
Forum List  »  Triggers

Re: Help with trigger
Posted by: Ronan Cashell
Date: April 23, 2012 08:02AM

Have a look at this http://www.it-iss.com/mysql/mysql-triggers/ will explain how triggers work with examples:

Your particular trigger would be something like:

DELIMITER $$
CREATE TRIGGER appointment01
AFTER UPDATE ON appointments
FOR EACH ROW BEGIN
UPDATE patients SET date_of_last_appointment = new.date_of_appointment WHERE patient_id = new.patient_id;
END;
$$

Ronan Cashell
Senior Oracle/MySQL Administrator
IT Integrated Business Solutions
http://www.it-iss.com

Options: ReplyQuote


Subject
Views
Written By
Posted
2756
April 23, 2012 04:35AM
1307
April 23, 2012 08:00AM
Re: Help with trigger
1490
April 23, 2012 08:02AM


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.