MySQL触发器插入问题

时间:2018-10-20 12:02:16

标签: php mysql triggers insert mysql-error-1442

我在桌上使用了此触发器。

CREATE TRIGGER `scoreGained` 
AFTER INSERT ON `tablegainscore` 
FOR EACH ROW  
BEGIN
        UPDATE tableuserscore 
        SET
        tableuserscore.score =
        tableuserscore.score + NEW.gainScore
    WHERE
        tableuserscore.userId = NEW.userId;

END 

但是我得到这个错误。 1442-无法更新存储函数/触发器中的表'tableuserscore',因为调用该存储函数/触发器的语句已使用该表。

我的错误是什么?

0 个答案:

没有答案