####
sql语句报错问题
#1055 - Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'cash.sdb_login_log.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
###
官方文档的解决方法:
文档链接:
https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sql-mode-setting
查询mysql服务器版本: select @@version 显示: 5.7.10 select @@GLOBAL.sql_mode; 显示结果: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
#查看sql_mode的语法 select @@GLOBAL.sql_mode; select @@SESSION.sql_mode;
#修改sql_mode的语法 SET GLOBAL sql_mode = 'modes'; SET SESSION sql_mode = 'modes'; 或者 set sql_model=‘’;
但是此方法并不是根本解决方案,当你的mysql再次重启后又会出现此问题, |