解决MySQL 5.7.9版本sql_mode=only_full_group_by问题

作者:xiaogezq0 时间:2024-01-26 15:02:22 

MySQL 5.7.9版本sql_mode=only_full_group_by问题

用到GROUP BY 语句查询时com.MySQL.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'col_user_6.a.START_TIME' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by错误

解决方法 :

执行SET GLOBAL sql_mode = ''; 把sql_mode 改成非only_full_group_by模式。

验证是否生效 SELECT @@GLOBAL.sql_mode 或 SELECT @@sql_mode


SET sql_mode ='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGI

以上所述是小编给大家介绍的解决MySQL 5.7.9版本sql_mode=only_full_group_by问题网站的支持!

来源:http://blog.csdn.net/xiao__ge/article/details/71077726

标签:mysql,only,full,group,by
0
投稿

猜你喜欢

  • ASP中双引号单引号和&连接符使用技巧

    2007-10-01 18:20:00
  • Python实现微信消息防撤回功能的实例代码

    2023-10-05 14:20:51
  • Python中函数参数调用方式分析

    2022-09-14 04:54:07
  • Python使用eval函数执行动态标表达式过程详解

    2022-05-29 07:03:30
  • Websocket通信协议在数字孪生中的应用

    2024-04-30 08:55:46
  • 王孟友教你如何设计标志(LOGO)

    2008-04-17 13:30:00
  • 在python中画正态分布图像的实例

    2021-04-13 01:42:23
  • mysql回表查询是什么,回表查询的使用

    2024-01-26 01:57:17
  • 如何修复使用 Python ORM 工具 SQLAlchemy 时的常见陷阱

    2022-07-03 20:51:47
  • golang交叉编译详细

    2024-05-02 16:26:31
  • MySQL中or语句用法示例

    2024-01-17 17:21:46
  • python 巡检脚本的项目实践

    2023-10-06 11:54:15
  • SQL 中主标识列IDENTITY使用技巧

    2011-06-02 08:47:00
  • cmd运行python文件时对结果进行保存的方法

    2023-03-12 03:18:02
  • python中print格式化输出的问题

    2021-02-25 23:20:30
  • python 通过 pybind11 使用Eigen加速代码的步骤

    2021-03-07 06:09:30
  • 二级联动下拉菜单javascript源码

    2010-03-16 12:32:00
  • python property的使用技巧分享

    2022-11-18 21:25:51
  • Python2.x版本中maketrans()方法的使用介绍

    2021-02-14 21:04:25
  • python去重,一个由dict组成的list的去重示例

    2023-09-26 03:54:44
  • asp之家 网络编程 m.aspxhome.com