当前位置:网站首页>[err] 1055 - expression 1 of order by clause is not in group by clause MySQL

[err] 1055 - expression 1 of order by clause is not in group by clause MySQL

2022-07-06 14:02:00 Little boy, handsome Yang Shaoping


problem :[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



Solution :

select version(),

@@sql_mode;SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));


The perfect solution is :


       
1 show variables like "sql_mode";
2
3 set sql_mode='';
4 set sql_mode='NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES';
  • 1.
  • 2.
  • 3.
  • 4.


原网站

版权声明
本文为[Little boy, handsome Yang Shaoping]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202131424462301.html