当前位置: 移动技术网 > IT编程>数据库>Mysql > [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

2018年09月03日  | 移动技术网IT编程  | 我要评论

问题[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

 

 

解决方案:

select version(),
@@sql_mode;set sql_mode=(select replace(@@sql_mode,'only_full_group_by',''));

 

 

 

 

完美的解决方案是:

 

1 show variables like "sql_mode";
2 
3 set sql_mode='';
4 set sql_mode='no_engine_substitution,strict_trans_tables';

 

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网