Skip navigation links

MySQL Forums :: Triggers :: Help with trigger


Advanced Search

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
Help with trigger 1065 Bryony Thompson 04/23/2012 04:35AM
Re: Help with trigger 589 laptop alias 04/23/2012 08:00AM
Re: Help with trigger 632 Ronan Cashell 04/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.