當我運行此查詢我正在一個犯錯只是簡單的更新查詢,如果是運行一個接一個工作正常。
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服務器版本使用附近的正確語法手冊「更新wp_posts設置POST_TITLE = CONCAT(POST_TITLE,」鍵盤「),其中id = 67131」在第2行
重要的事情是,當我一個一個地運行查詢行,它完美的工作!如果我運行他們的行中的所有行的查詢失敗
請幫助我理解這個問題
感謝阿薩夫
在每個Update語句末尾添加';' – Jens