向mysql插入数据时出错

发布于 2024-09-10 02:23:27 字数 425 浏览 3 评论 0原文

我正在尝试使用 BigDump 将数据从 csv 文件插入到 mysql 中。

它停在第 2 行,并出现错误:

“查询:插入位置值 (1,"O1","","","",0.0000,0.0000,, );

MySQL:您的 SQL 中有错误 句法;检查手册 对应你的MySQL服务器 正确使用语法的版本 第 1 行的 ')' 附近"

如果我在 phpmyadmin 中运行该语句,它会显示:

“#1064 - 您的 SQL 中有错误 句法;检查手册 对应你的MySQL服务器 正确使用语法的版本 第 1 行的 ')' 附近"

我该怎么做才能使数据进入数据库?

谢谢。

I am trying to insert data from a csv file into mysql using BigDump.

It stops on line 2, with the error:

"Query: INSERT INTO location VALUES
(1,"O1","","","",0.0000,0.0000,, );

MySQL: 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 ' )' at line 1"

If I run the statement from withing phpmyadmin, it says:

"#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 ' )' at line 1"

What can I do to make the data get into the database?

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

停顿的约定 2024-09-17 02:23:27

没有值的逗号对我来说看起来很粗略。

INSERT INTO location VALUES (1,"O1","","","",0.0000,0.0000,, );

可能应该为

INSERT INTO location VALUES (1,"O1","","","",0.0000,0.0000,NULL,

NULL);

The commas with no values looks sketchy to me.

INSERT INTO location VALUES (1,"O1","","","",0.0000,0.0000,, );

should probably be

INSERT INTO location VALUES (1,"O1","","","",0.0000,0.0000,NULL,

NULL);

弥枳 2024-09-17 02:23:27

您的插入语句是否包含表中每一列的值?如果没有,您必须为列命名。

例如,

insert into location (col1, col2, col3) values (1, 2, 3);

如果您向我们展示 LOCATION 表的结构,您可以获得更好的答案。

Does your insert statement contain values for every column in the table? If not, you have to name the columns.

For example,

insert into location (col1, col2, col3) values (1, 2, 3);

If you show us the structure of the LOCATION table you can get better answers.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文