10 lines
248 B
MySQL
10 lines
248 B
MySQL
|
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 ;
|