Skip to content

Instantly share code, notes, and snippets.

@marcelogrsp
Created July 3, 2020 21:43
Show Gist options
  • Save marcelogrsp/33b6660d1e6366668bce4cad8c524324 to your computer and use it in GitHub Desktop.
Save marcelogrsp/33b6660d1e6366668bce4cad8c524324 to your computer and use it in GitHub Desktop.
DELIMITER $$
CREATE TRIGGER `MODIFIED_DATE` BEFORE UPDATE ON `TBL_COMPANIES`
FOR EACH ROW
BEGIN
IF (NEW.Operator_name is not null) THEN
SET NEW.Modified = CURRENT_TIMESTAMP();
END IF;
END $$
DELIMITER ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment