<p>MySQL5.7版本sql_mode=only_full_group_by问题解决办法。sql语句查询使用GROUP BY出现报错:</p><p>具体出错提示:</p><pre class="brush:html;toolbar:false">[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by</pre><p><strong>1、查看sql_mode</strong></p><pre class="brush:sql;toolbar:false;">select @@global.sql_mode</pre><p>查询出来的值为:</p><pre class="brush:sql;toolbar:false">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</pre><p><strong>2、去掉ONLY_FULL_GROUP_BY,重新设置值。</strong></p><pre class="brush:sql;toolbar:false">set @@global.sql_mode ='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';</pre><p>好了,以上就是关于“MySQL5.7版本sql_mode=only_full_group_by问题解决办法”的全部内容了,小伙伴们如果有更好的建议,欢迎到文章下面的评论区留言告诉我们。</p>