Caused by: 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 (oid varchar(255) not null auto_increment, address varchar(255), ordertime' at line 1

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

    at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)

    at com.mysql.jdbc.Util.getInstance(Util.java:384)

    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1054)

    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3566)

    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3498)

    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)

    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2113)

    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2562)

    at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1664)

    at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1583)

    at com.mchange.v2.c3p0.impl.NewProxyStatement.executeUpdate(NewProxyStatement.java:64)

    at org.hibernate.tool.schema.internal.TargetDatabaseImpl.accept(TargetDatabaseImpl.java:56)

    ... 59 more

不想多说,烦,order是一个sql的关键字,不能用它做表名,所以我改成了tb_order

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server versio的更多相关文章

  1. ERROR: 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 'type=InnoDB' at line 7

    问题: 使用hibernate4.1.1,数据库使用mysql5.1.30,使用hibernate自动生成数据库表时,hibernate方言使用org.hibernate.dialect.MySQLI ...

  2. C# 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 ????

    有几年没用过MySql数据了,今天在使用C#访问MySql数据库时出现了一个小插曲. 错误提示: You have an error in your SQL syntax; check the man ...

  3. 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 ...

  4. 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 '

    mysql中如果字段使用了关键字,在插入和更新时会提示 You have an error in your SQL syntax; check the manual that corresponds ...

  5. 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 ...

    下面是我update数据库时打印出来的异常: ### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSynt ...

  6. 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 'like '%逸%'' at line 1

    <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-/ ...

  7. 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 'groups)VALUES('1','hh','hh@163.com','Boss')' at line 1

    mysql8.0版本 在已存在的表里插入一条数据 insert INTO api_user(id,username,email,groups)VALUES('1','hh','hh@163.com', ...

  8. 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 'group t1,customer t2

    ### SQL: select t1.gid,t1.gname,t1.gvalue,t1.gtype, t1.gaddress,t1.gmembers, t1.gcode,t1.gphone, t2. ...

  9. 解决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 (order_name, customer)

    在学习hibernate一对多映射关系时,根据视频学习的时候,例子是顾客和订单的问题,一个顾客有多个订单.按照视频中的敲代码出现了You have an error in your SQL synta ...

随机推荐

  1. 报错TypeError: $(...).live is not a function解决方法

    报错的原因是这个方法在jquery1.7以后就被废除了, 1.7以后的版本改用.on()方法 之前的用法: .live(events, function) 新方法: .on(eventType, se ...

  2. Select2控件不能自适应的解决办法

    $.fn.select2.defaults.set('width', '100%');

  3. js坚持不懈之14:不要在文档加载之后使用 document.write()示例

    在看w3school的JavaScript教程时,关于文档输出流中有这么一句话:绝不要在文档加载之后使用 document.write().这会覆盖该文档. 不太明白什么意思,找了一个例子: < ...

  4. IPV6地址中的%号什么意思

    在我配置ipv6 网络中,会发现ipv6地址后有%号,这表示什么呢? IPv6地址中的百分号是网卡interface标识.这个表示该地址仅限于标号为21的网络接口(一般指网卡或者虚拟网卡).而在其他网 ...

  5. 野指针与'关键字'NULL

    野指针与'关键字'NULL 一.NULL是什么? 在C/C++中的标准定义: #ifdef __cplusplus //条件编译,判断是c++还是c环境 #define NULL 0 //c++环境 ...

  6. 3Openwrt自定义CGI实现 前后端交互

    https://www.cnblogs.com/163yun/p/9834993.html 安装uhttpd. 在编译openwrt前,输入make memuconfig,查找Network -> ...

  7. Generetor函数与线程之间的思考

    在解析这个问题之前,首先,我们来了解一下es6标准里新增解决异步的两种规范 Promise与Generetor Promise 其实Promise的本质 还是基于js程式的回调处理----这一点看它的 ...

  8. 类Object

    Object概述 java.lang.Object类是Java语言中的根类,即所有类的父类.它中描述的所有方法子类都可以使用.在对象实例化的时候,最终找的父类就是Object. 如果一个类没有特别指定 ...

  9. C++中endl和cout语句

    cout是什么?它是一个对象,它代表着计算器的显示器屏幕. 在c++里,信息的输出显示可以通过使用cout和左向‘流’操作符(<<)来完成 这个操作符表面了从一个值到控制台的数据流向! c ...

  10. [c++项目]迷宫 控制台游戏

    #include<stdio.h> #include<windows.h> #include<stdlib.h> #include<time.h> #i ...