gpt4 book ai didi

mysql - 我的 sql 语法错误 1064 - 找不到问题所在

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

当我运行这个查询时出现这个错误信息

SELECT name,state FROM customers WHERE state ‌IN ('CA','NC','NY')

错误SQL 查询:文档

SELECT name, state
FROM customers
WHERE state ‌IN(

'CA', 'NC', 'NY'
)
LIMIT 0 , 30

MySQL 说:文档

#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 '‌in ('CA','NC','NY') LIMIT 0, 30' at line 1

我去看看http://dev.mysql.com/doc/refman/5.6/en/error-messages-server.html但我还是找不到原因

谢谢

最佳答案

去掉IN之后的=

SELECT name, state FROM customers 
WHERE state ‌IN ('CA','NC','NY')

关于mysql - 我的 sql 语法错误 1064 - 找不到问题所在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19636767/

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