MySQL 报错 1055

Posted 坨之歌

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MySQL 报错 1055相关的知识,希望对你有一定的参考价值。

 



具体报错

[2019-02-20 11:57:36] [42000][1055] Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column exer.student.sid which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

 

 解决方案

select version(),
@@sql_mode;SET sql_mode=(SELECT REPLACE(@@sql_mode,ONLY_FULL_GROUP_BY,‘‘));

 

 

show variables like "sql_mode";
set sql_mode=‘‘;
set sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES;

 

以上是关于MySQL 报错 1055的主要内容,如果未能解决你的问题,请参考以下文章

mysql报错err1055

TP3.2项目 MySQL5.7报错1055 group by新特性

MySQL错误1055

MySQL错误1055

MYSQL报错:1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated col

windows server 2008 安装MySQL 8.0 遇到报错 1055 - Expression #1 of ORDER BY clause is not in GROUP BY(示例代