zoukankan      html  css  js  c++  java
  • MySQL报错com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException

    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 'DESC'
    

    如果你用的数据库是MySQL8.0,那么请将group by 改为order by,因为在8.0之前,group by 包含using filesort,而8.0开始是没有的,为了避免这种问题,8.0开始除了索引替换排序的优化思路之外的相关排序,我们都必须使用order by来进行。

  • 相关阅读:
    day08
    day07
    day06
    day06
    day05
    第三次作业
    第三次作业
    第二次作业
    java 数字和日期处理
    jsp文件导包
  • 原文地址:https://www.cnblogs.com/lsys/p/11777129.html
Copyright © 2011-2022 走看看