英文:
Why is MySQL rejecting the following query?
问题
以下是翻译好的部分:
UPDATE table_one
SET user_accessible = 1
WHERE volume == 2
AND lesson_order == '04'
LIMIT 1
错误信息如下:
在你的SQL语法中存在错误;请检查与你的MariaDB服务器版本相对应的手册,以找出在第1行使用的正确语法。
查询语句在我看来是正确的
英文:
UPDATE table_one
SET user_accessible = 1
WHERE volume == 2
AND lesson_order == '04'
LIMIT 1
It's giving the following error:
>You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '= '2' AND lesson_order
== '04') LIMIT 1' at line 1
The query looks correct to me
答案1
得分: 2
你在比较时犯了一个错误。请使用单个 = 而不是 ==。
UPDATE table_one
SET user_accessible = 1
WHERE volume = 2
AND lesson_order = '04'
LIMIT 1
英文:
You made a mistake on your comparison. Use single = not ==
UPDATE table_one
SET user_accessible = 1
WHERE volume = 2
AND lesson_order = '04'
LIMIT 1
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论