MySQL error code 1235

前端 未结 2 1807
礼貌的吻别
礼貌的吻别 2020-12-17 11:09

In MySQL I tried to define a trigger like this:

DELIMITER $$  
CREATE TRIGGER vipInvite  
AFTER INSERT ON meetings  
         


        
2条回答
  •  长情又很酷
    2020-12-17 11:12

    This error means you already have an AFTER INSERT trigger on meetings table.

    If it is the same trigger (meaning vipInvite) that you created earlier and now you want to replace it then you need to drop it first

    DROP TRIGGER vipInvite;
    DELIMITER $$  
    CREATE TRIGGER vipInvite
    ...
    END$$
    DELIMITER ;
    

    Now if you have some other trigger you have to merge code from both triggers into one, then drop existing trigger, and then create a new one.

    To show the list of existing triggers use SHOW TRIGGERS.

    SHOW TRIGGERS WHERE `table` = 'meetings';
    

提交回复
热议问题