触发器问题,上次提问已石沉大海
我写了个这样的触发器.顺便说下,表ntt里有no,no_no,ct这3个字段,no字段是个auto_increment列
CREATE TRIGGER ntt_ct BEFORE INSERT
ON ntt FOR EACH ROW BEGIN
UPDATE ntt SET ct=1 WHERE no=NEW.no_no;
END
那个替换;用的DELIMITER |我当然也加了
但现在我如果执行INSERT语句,就会出如下错误
Can 't update table 'ntt ' in stored function/trigger because it is already used by statement which invoked this stored function/trigger
这是怎么回事
------解决方案--------------------不会触发器,帮你顶