-
-
Save uncoded-ro/76975919b08459ae7f34fa43e7a2eb14 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE sakila; | |
DROP TRIGGER IF EXISTS insert_after_actor; | |
DELIMITER $$ | |
CREATE TRIGGER insert_after_actor | |
AFTER INSERT | |
ON actor FOR EACH ROW | |
BEGIN | |
INSERT INTO actor_log (event, actor_id, first_name, last_name) | |
VALUES ('insert', new.actor_id, new.first_name, new.last_name); | |
END $$ | |
DELIMITER ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment