Mysql 错误 check the manual that corresponds to your MySQL server version for the right syntax to use
程序员文章站
2022-04-21 15:34:57
...
描述
今天在通过jpa建立数据库时,偶然间发现有一个表没有建立,通过查询日志发现报错了
create table order
(
id integer not null auto_increment,
address varchar(40),
insert_time timestamp default current_timestamp,
remark varchar(40),
score integer,
status bit,
update_time timestamp default current_timestamp,
primary key (id)
);
这是报错的代码部分
[42000][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
这是error打印
分析
order 时sql中的关键字!!!
我这该死的命名,本来是用做order做“订单”的表名
解决方式就是换一个命名,写一篇简单的博客告诫自己不要用sql关键字或者保留字做表名
上一篇: Oracle数据库开发必备利器之SQL基础——管理表
下一篇: jpa根据日期查询某天数据问题
推荐阅读
-
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
-
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
-
MySql-You have an error in your SQL syntax; check the manual that corresponds to your MySQL server v
-
(1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server
-
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
-
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
-
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
-
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
-
MySQL server version for the right syntax to use near '' at
-
check the manual that corresponds to your MySQL server version for the right syntax的错误解析,correspondssyntax