触发不在mysql中创建
我正在尝试在MySQL中为数据库编写一个触发器,但是当我运行查询时,然后运行show triggers nothing没有显示。我相信我的语法是正确的,并且在运行查询时不会遇到任何错误。查询在下面,有什么想法为什么会发生这种情况?
CREATE TRIGGER after_violation_insert
AFTER INSERT
ON violation
FOR EACH ROW
UPDATE listing
SET Listing_True_False = "true"
WHERE Listing_ID = new.Listing_ID;
I am trying to write a trigger for my database in mySQL yet when I run the query and then run SHOW TRIGGERS nothing is showing. I believe my syntax is correct and am not running into any errors when running the query. The query is below, any ideas why this is happening?
CREATE TRIGGER after_violation_insert
AFTER INSERT
ON violation
FOR EACH ROW
UPDATE listing
SET Listing_True_False = "true"
WHERE Listing_ID = new.Listing_ID;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论