gpt4 book ai didi

mysql - SQL查询失败,42000 1064

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

此查询:

INSERT INTO languages(id_639_3,part2B,part2T,part1,scope,language_type,ref_name,comment) VALUES ('aaa','','','','I','L','Ghotuo','');

因以下错误而失败:

[Illuminate\Database\QueryException]
SQLSTATE[42000]: Syntax error or access violation: 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 'INSERT INTO languages(id_639_3,part2B,part2T,part1,scope,language_type,ref_na' at line 1 (SQL: INSERT INTO languages(id_639_3,part2B,part2T,part1,scope,language_type,ref_name,comment) VALUES ('aaa','','','','I','L','Ghotuo',''))

最佳答案

INSERT INTO languages (id_639_3,part2B,part2T,part1,scope,language_type,ref_name,comment)
VALUES ('aaa','','','','I','L','Ghotuo','');

为什么不尝试不使用 ''/null 值呢?像这样:

INSERT INTO languages (id_639_3,scope,language_type,ref_name)
VALUES ('aaa','I','L','Ghotuo');

为了获得更好的错误消息,请将其分成几行。 -- 您还需要在 table_name 和括号内的 column_names 之间放置一个空格。

关于mysql - SQL查询失败,42000 1064,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24520691/

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