[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated
mysql客戶端查詢報這個錯誤,如下所示:
[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
有兩種修改方式如下所示:
set @@sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
set global sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
?
@@sql_mode?設置的是當前會話
global?sql_mode?設置的是當前運行的mysql服務
修改配置文件是真正全局的
總結
以上是生活随笔為你收集整理的[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: [pytorch] 通过一个例子分析to
- 下一篇: 无花果干(说一说无花果干的简介)