MySQL异常 check the manual that corresponds |
您所在的位置:网站首页 › 华硕amd组raid0 › MySQL异常 check the manual that corresponds |
向数据库中表中插入数据时候 一直报错 无法插入成功 信息 java.sql.SQLException: 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,create_time,oprice,ostatus,mid)values('16009113129672','2020-09-24',49' at line 1 Query: insert into order(oid,create_time,oprice,ostatus,mid)values(?,?,?,?,?) Parameters: [16009113129672, 2020-09-24, 49, 0, 2]SQL异常:语法错误 检查相应的手册 环境 MySQL数据库 原因 表名order 与 排序 order 同名 知识点 反引号:区分MYSQL的保留字与普通字符而引入的符号 单引号:环绕Varchar类型数据 划重点 当MYSQL表名或属性名 与 关键字|保留字冲突时 如果坚持使用 一定要使用反引号 `` 适用于 表名和字段名 create table if not exists`user` ( `uid` int(11) primary key auto_increment comment '用户编号', `uname` varchar(50) not null comment '用户名', `upwd` varchar(50) not null comment '密码' )总结 在各种语言中尽量避免 变量名与关键字冲突 |
今日新闻 |
点击排行 |
|
推荐新闻 |
图片新闻 |
|
专题文章 |
CopyRight 2018-2019 实验室设备网 版权所有 win10的实时保护怎么永久关闭 |