【发布时间】:2017-01-07 21:48:29
【问题描述】:
需要帮助
当我运行这个查询时,我得到了一个错误 Just simple update query 如果正在一个一个地运行,它可以正常工作。
update wp_posts
set post_title = CONCAT(post_title,' Keyboard')
where id = 67096 and NOT post_title like '%keyboard%'
update wp_posts
set post_title = CONCAT(post_title,' Keyboard')
where id = 67079 and NOT post_title like '%keyboard%'
update wp_posts
set post_title = CONCAT(post_title,' Keyboard')
where id = 67072 and NOT post_title like '%keyboard%'
我收到了这个错误消息
1064 - 您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以在第 2 行的 'update wp_posts set post_title = CONCAT(post_title,' Keyboard') where id = 67131' 附近使用正确的语法
重要的是,当我一行一行地运行查询时,它可以完美运行!如果我逐行运行它们,查询将失败
请帮助我理解问题
感谢阿萨夫
【问题讨论】:
-
在每个更新语句的末尾添加
;
标签: mysql