MySQL Trigger Update with select from another table

后端 未结 2 1827
猫巷女王i
猫巷女王i 2020-12-18 08:26

Just learning about triggers and I\'m created the following trigger;

CREATE TRIGGER `incremental_before_ins_tr` BEFORE INSERT ON incremental`
FOR EACH ROW
BE         


        
2条回答
  •  一向
    一向 (楼主)
    2020-12-18 09:10

    Looks like you have a typo.

    You have entered incremental with a trailing backtick instead of enclosing it in backticks.

    It is likely that your trigger is now bound to a table called incremental` which I am assuming does not exist.

    Since you have ruled out the above. I see that the UPDATE keyword is missing. Add UPDATE table before your SET line. Replace table with the name of your table.

提交回复
热议问题