#1055 - Expression of SELECT list is not in GROUP BY clause and contains nonaggregated column this i
2017-01-11 11:01
1466 查看
这个sql语句违背了sql_mode=only_full_group_by 。
先看看这个sql_mode=only_full_group_by是个什么意思:
(摘自官网文档)
来源链接:
http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_only_full_group_by
MySQL Handling of GROUP BY
解决办法:
去掉ONLY_FULL_GROUP_BY即可正常执行sql.
Scroll to the bottom of file Copy and paste
to the bottom of the file
save and exit input mode
先看看这个sql_mode=only_full_group_by是个什么意思:
(摘自官网文档)
http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_only_full_group_by
MySQL Handling of GROUP BY
解决办法:
sudo vim /etc/mysql/conf.d/mysql.cnf
Scroll to the bottom of file Copy and paste
[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
to the bottom of the file
save and exit input mode
sudo service mysql restartto restart MySQL.
相关文章推荐
- #1055 - Expression of SELECT list is not in GROUP BY clause and contains nonaggregated column this i
- #1055 - Expression of SELECT list is not in GROUP BY clause and contains nonaggregated column this i
- [Err] 1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated colum
- mysql错误:Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'ga
- MySQL: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'sss
- SELECT list is not in GROUP BY clause and contains nonaggregated column this is incompatible with sql_mode=only_full_group_by
- [mysql] Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'lo
- [Err] 1055 - Expression #4 of SELECT list is not in GROUP BY clause and contains nonaggregated colum
- [Err] 1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated colum
- Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'userinfo.
- mysql:Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column
- MySQL: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column '
- ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregate
- Mysql解决SELECT list is not in GROUP BY clause and contains nonaggregated column 问题
- Error Code: 1055. Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated
- mysql5.7 报错1055:Expression #1 of SELECT list is not in GROUP BY clause and contains non
- [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated c
- [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated c
- MySQL报错“Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre”
- mysql遇见Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre的问题