【发布时间】:2015-08-06 00:49:37
【问题描述】:
我正在使用 Spring Boot,我想添加新的“冠军”,这是代码
Champ c = new Champ();
c.setOrder(1);
c.setType("RRRR");
c.setStructurenotification("#AA");
champservice.AddNewChamp(c);
表"champ" 有字段:"idchamp", "structidstructurenotification" ,"type" and "order".
但我得到了这个错误
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 'order,
structidstructurenotification, type, idchamp)
values (1, '#AA', 'RRRR', 0' at line 1
【问题讨论】:
-
我认为它是因为“订单”它 Ordery 是 Order By 的关键字..更改列名并尝试
标签: mysql sql spring-boot