salix/db/routines/account/triggers/account_afterInsert.sql

10 lines
248 B
MySQL
Raw Permalink Normal View History

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `account`.`account_afterInsert`
AFTER INSERT ON `account`
FOR EACH ROW
BEGIN
INSERT IGNORE INTO userSync (`name`)
SELECT `name` FROM `user` WHERE id = NEW.id;
END$$
DELIMITER ;