我想更新表格'表格'插入后,下面的触发器不起作用。它给出语法错误;
CREATE TRIGGER sheet_insert AFTER INSERT ON `sheet`
FOR EACH ROW BEGIN
UPDATE `sheet` SET `solution`="No", `status`="In Progress", `cause`="Under Investigation"
WHERE `status`=""
END;
非常感谢任何帮助或指导。
此致
答案 0 :(得分:1)
使用此:
delimiter |
CREATE
TRIGGER sheet_insert AFTER INSERT ON `sheet`
FOR EACH ROW BEGIN
UPDATE `sheet` SET `solution`="No", `status`="In Progress", `cause`="Under Investigation"
WHERE `status`="";
END;
delimiter ;