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
 

解決問題><

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章