gpt4 book ai didi

mysql - 修改选择查询以删除查询

转载 作者:可可西里 更新时间:2023-11-01 08:55:41 24 4
gpt4 key购买 nike

以下选择查询工作正常:

SELECT * FROM JBPM_JOB job WHERE job.ACTION_ IN (SELECT ID_ from JBPM_ACTION WHERE ACTIONEXPRESSION_ LIKE '%#{reminderAction.addAsyncProcessReminder%warning%');

但是,当我尝试删除此处检索到的行时,它失败了

DELETE FROM JBPM_JOB job WHERE job.ACTION_ IN (SELECT ID_ from JBPM_ACTION WHERE ACTIONEXPRESSION_ LIKE '%#{reminderAction.addAsyncProcessReminder%warning%');

这里有什么问题吗?

错误信息是:

错误 1064 (42000):您的 SQL 语法有误;查看与您的 MySQL 服务器版本对应的手册,了解在第 1 行的 'job WHERE job.ACTION_ IN (SELECT ID_ from JBPM_ACTION WHERE ACTIONEXPRESSION_ LI' 附近使用的正确语法

最佳答案

您需要指定要从别名表中删除,因此请使用:

DELETE job FROM JBPM_JOB job WHERE job.ACTION_ IN (SELECT ID_ from JBPM_ACTION WHERE ACTIONEXPRESSION_ LIKE '%#{reminderAction.addAsyncProcessReminder%warning%');

关于mysql - 修改选择查询以删除查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4967971/

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