Tell me where is the error?
CREATE TRIGGER `updateBonusTable` AFTER UPDATE ON `character_subclasses` FOR EACH ROW BEGIN IF(NEW.level = 85) AND (OLD.level != 85) THEN SET @charName = (select `char_name` from `characters` WHERE `obj_Id` = NEW.char_obj_id LIMIT 1); INSERT into ttgBonus.bonus_85_lvl (`charName`) VALUES(@charName); END IF; END; Writes an Error SQL Error (1064): You have an error in your SQL syntax; check the syntax for your right syntax to use at line 4
char_name, or that thechar_namethe same in all records. And in principle, everything is easily minimized into one request, so DELIMITER will not have to redefine it. - Akina