gpt4 book ai didi

mysql - 奇怪的 MySQL 问题

转载 作者:行者123 更新时间:2023-11-29 06:16:09 25 4
gpt4 key购买 nike

大家好,我在使用 MySQL 时遇到了问题。

当我使用此查询时,它会引发错误。

update table set column1 = 'test' where column2 = 'xy' and column3 = 'xx'

错误是:

#1064 - You have an error in your SQL syntax; 
check the manual that corresponds to your MySQL server version for the
right syntax to use near 'column2 = 'xy' and column3 = 'xx'' at line 1

我做错了什么?

干杯。

最佳答案

您需要提供真实的姓名和值以及真实的错误。您希望别人如何帮助您?

根据您对@Will A 答案的评论,column2 似乎是保留字。尝试将其括在勾号 (`) 中或写入 tablename.columnname 而不仅仅是 columnname

关于mysql - 奇怪的 MySQL 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6379750/

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