gpt4 book ai didi

mysql - 触发

转载 作者:行者123 更新时间:2023-11-29 02:05:19 28 4
gpt4 key购买 nike

这是一段代码,我收到以下错误

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4

触发器如下

CREATE TRIGGER updtrigger BEFORE UPDATE ON login
FOR EACH ROW
IF NEW.first >100 THEN
SET PASSWORD = furqan;
END IF;
END

最佳答案

furqan是一个字符串,应该用引号括起来

CREATE TRIGGER updtrigger BEFORE UPDATE ON login
FOR EACH ROW
IF NEW.first >100 THEN
SET PASSWORD = 'furqan';
END IF;
END

关于mysql - 触发,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7276661/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com