首页 > 数据库 >mysql8 执行聚合函数报错:Error 1140: In aggregated query without GROUP BY,sql_mode=only_full_group_by

mysql8 执行聚合函数报错:Error 1140: In aggregated query without GROUP BY,sql_mode=only_full_group_by

时间:2023-06-24 21:55:04浏览次数:62  
标签:1140 full NO ZERO 报错 mode sql DATE

解决办法:

set global sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
SET GLOBAL log_bin_trust_function_creators = 1;
set session sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';

标签:1140,full,NO,ZERO,报错,mode,sql,DATE
From: https://www.cnblogs.com/zhanghongrui/p/17501758.html

相关文章