插入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

插入一个很简单的sql语句时候,mysql一直报错:

[SQL] INSERT INTO ORDER (
id,
activity_id,
order_type,
phone,
order_amount,
order_state,
pay_type
)
VALUES
(
‘4‘,
‘2121313‘,
‘1‘,
‘13552444989‘,
‘1‘,
‘1‘,
‘1‘
)

[Err] 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 ‘ORDER (
id,
activity_id,
order_type,
phone,
order_amount,
order_stat‘ at line 1

想了半天,忽然发现 order是mysql的关键字,不能当做表名字来使用。。。 真是醉了!

时间: 2024-09-29 18:06:08

插入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的相关文章

SQL语句报错:You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near

报错如图: 最开始其实我的列名tname和tsubject分别叫name和subject,后来看到网上有说这个报错可能是数据库建表的时候使用了mysql的关键词,我就只把name改了.后来还是这个问题,百思不得其解. 后来同学告诉我说老师帮她检查SQL语句的问题时都是把php程序里的SQL语句先复制到mysql里面去执行看是不是数据库的问题的. 太tm机智了,我怎么没想到呢,姜还是老的辣.复制过去一看,怎么subject也是关键词啊! 很有信心的改掉以后等待正确结果,但是竟然还是这个错... 没

插入数据库失败([Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version)

报错信息如下: [SQL]INSERT INTO read VALUES(123, 456) [Err] 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 'read VALUES(123, 456)' at line 1 原因,read是数据库的关键字, 牢记,如果

mybatis的报错总结_____2Error updating database. Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the ri

在编写动态sql时 trim的属性写错了,如下图: 错误示范: (接口的xml配置文件中:) 1 <update id="modifyBill" parameterType="Bill"> 2 update smbms_bill 3 <trim suffix="set" prefixOverrides="," prefix="where id=#{id}"> 4 <if tes

MySql 执行语句错误 Err] 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

关于用Power Designer 生成sql文件出现 错误  [Err] 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 'int not null auto_increment comment '用户id', 的解决办法 sql语句如下 1 drop table

[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL s

[Err] 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 3 MySQL 5.6,Navicat For MySQL 10.0.10 中执行SQL语句时提示此错误,在CMD中执行SQL文件中的语句时提示以下错误: D:\Users\Aven>mys

Mysql错误:[Err] 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

[Err] 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 如果不是符号中英文切换的问题,那就是反引号写成单引号引起的  参考链接:https://blog.csdn.net/qq_27495157/article/details/80240156 原文地址:htt

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 &#39;?,?,?,?)&#39;

使用?占位符写MYSQL查询语句,执行报错 1 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 2 at sun.ref

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 &#39;where id = 2&#39; at line 8

字典管理修改接口测试传了id后出现: 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 'where id = 2' at line 8 百度翻译:您的SQL语法有错误:请查阅与您的MySQL服务器版本相对应的手册,以获得在第8行“where id=2”附近使用的正确语法. 百度解

MySQLSyntaxErrorException: 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 &#39;:ge

数据库表里命名有这个字段,可怎么就是报错呢,大神的解释: 加上之后立马好用!!! MySQLSyntaxErrorException: 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 ':ge