插入时mysql错误1064

发布于 2024-10-04 16:05:18 字数 250 浏览 0 评论 0原文

1064 - 您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,了解在第 1 行“(country,ping,order) VALUES (China,1,1)”附近使用的正确语法

这是我的代码

INSERT INTO  
  (country, ping, order) 
VALUES 
  ('China', '1', '1');

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 '(country,ping,order) VALUES (China,1,1)' at line 1

this is my code

INSERT INTO  
  (country, ping, order) 
VALUES 
  ('China', '1', '1');

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

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

发布评论

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

评论(4

五里雾 2024-10-11 16:05:18

您缺少表名称。尝试:

INSERT INTO MYTABLENAME (country,ping,order) VALUES ('China','1','1');

You're missing the Table Name. Try:

INSERT INTO MYTABLENAME (country,ping,order) VALUES ('China','1','1');
北城挽邺 2024-10-11 16:05:18

ping 和 order 是文本字段还是数字字段?如果数字从 1 中删除勾号

INSERT INTO Tablename (country,ping,order) VALUES ('China',1,1)

也可以是保留字尝试:

INSERT INTO Tablename (country,`ping`,`order`) VALUES ('China',1,1)

are ping and order text fields or numeric? if numeric remove the ticks from the 1's

INSERT INTO Tablename (country,ping,order) VALUES ('China',1,1)

could also be reserved word try:

INSERT INTO Tablename (country,`ping`,`order`) VALUES ('China',1,1)
心的位置 2024-10-11 16:05:18

您的插入语句缺少表名称:

INSERT INTO tbl_name (col_name,...) VALUES (expr,...)

Your insert statement is missing the table name:

INSERT INTO tbl_name (col_name,...) VALUES (expr,...)
又怨 2024-10-11 16:05:18

您缺少表名。还要确保这些引号是必要的

you are missing table name. also make sure that those quotes are necessary

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