报错信息:1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘xxxx.xxxx.xxx’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by, Time: 0.000000s
在SQL 或 Navicat 中执行 :
set global sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
set session sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
备注:需要选择到对应数据库,在执行该sql语句。不然就会出现在这个这个库可以执行,但是其他库不能执行group by 语句。