jdbc4.MySQLSyntaxErrorException:Expression #2 of SELECT list is not in GROUP BY clause and contains
2017-06-03 11:36
591 查看
今天在用eclipse做java web项目时,遇到这样一个坑
用sql查询:
查询出来的值为:
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
去掉ONLY_FULL_GROUP_BY,重新设置值。
用sql查询:
select @@[code]global.sql_mode[/code]
查询出来的值为:
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
去掉ONLY_FULL_GROUP_BY,重新设置值。
set @@[code]global.sql_mode ='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';[/code]
相关文章推荐
- MySQL: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'sss
- [mysql] Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'lo
- MySQL: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column '
- mysql遇见Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre的问题
- #1055 - Expression of SELECT list is not in GROUP BY clause and contains nonaggregated column this i
- mysql:Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column
- #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
- 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
- Docker安装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 nonaggregated column 'ga
- [Err] 1055 - Expression #4 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 nonag
- Docker安装MySQL遇见Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre的问题
- ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregate
- Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'userinfo.
- 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的问题
- [Err] 1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated colum