zoukankan      html  css  js  c++  java
  • Error Code : 1064 You have an error in your SQL syntax; check the manual that corresponds to your My

    转自:https://blog.csdn.net/haha_66666/article/details/78444457
    Query : select * from order LIMIT 0, 1000
    Error Code : 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 LIMIT 0, 1000’ at line 1

    今天在查询数据的时候遇到这个错误,特别的郁闷,感觉自己写的sql语句没有问题啊,但就是提示我的sql语法错误,后来终于找到了原因

    该错误一般出现在表名或字段名设计的过程中出现了mysql关键字导致的。

    如果你用了mysql中的关键字做字段,当你查询的时候可以用 `把 order 来括起来

    这个 `并不是单引号,而是数字那一行键的最左边的那个键,注意要在在英文状态下输入,用它把关键字括起来就可以解决这个问题

    还有就是在用sql语句创建表时,先输入

    create table `tb_qwer`()

    然后再在括号体中输入具体内容

  • 相关阅读:
    等待通知--wait notify
    表单重复提交与解决
    Cookie Session 与Token
    springMVC实现登陆
    第11章 AOF持久化
    第10章 RDB持久化
    MyBatis动态SQL
    第4章 网络层
    第9章 数据库
    代理设计模式
  • 原文地址:https://www.cnblogs.com/manmanchanglu/p/11756222.html
Copyright © 2011-2022 走看看