MySQL Forums
Forum List  »  Newbie

Re: Update trigger problem.
Posted by: Phillip Ward
Date: April 11, 2025 07:23AM

How about something like this?

DELIMITER //
CREATE TRIGGER delaylogtrigger
   AFTER UPDATE ON settings 
   FOR EACH ROW
BEGIN
   IF ( old.delay <> new.delay ) THEN -- delay field has changed 
      insert 
      into delaylog ( delayvalue ) 
             values ( new.delay ); 
   END IF;
END;//
DELIMITER ;

Regards, Phill W.

Options: ReplyQuote


Subject
Written By
Posted
April 10, 2025 05:18AM
Re: Update trigger problem.
April 11, 2025 07:23AM


Sorry, only registered users may post in this forum.

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.