1
DELIMITER ||
CREATE TRIGGER `monthly_insert` BEFORE INSERT ON `history_monthly`
FOR EACH ROW
BEGIN
NEW.`uid` = CONCAT(OLD.`year`, OLD.`month`, OLD.`charactersId`);
END;
||
DELIMITER ;
並返回一個錯誤:MySQL CREATE TRIGGER,語法錯誤。我做錯了什麼?
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.`uid` = CONCAT(OLD.`year`, OLD.`month`, OLD.`charactersId`);
END' at line 4
這是我第一次用觸發器和我盡我所能,試圖找到soultion但我失敗了; <
如果這是一個`BEFORE INSERT`觸發器,肯定不會有舊行? – 2011-02-09 18:37:23