mysql报错-ORDER BY clause is not in GROUP BY clause and contains

在创建表时,mysql出现如下报错

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

这是因为使用这个就是使用和oracle一样的group 规则, select的列都要在group中,或者本身是聚合列(SUM,AVG,MAX,MIN) 才行,其实这个配置目前个人感觉和distinct差不多的,所以去掉就好 

参见:https://blog.csdn.net/fansili/article/details/78664267

本人使用第二共办法,修改my.cnf配置文件

vi /etc/my.cnf

[mysqld] sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

service mysqld restart
 

解决问题><

 

你可能感兴趣的:(mysql)