处理MySQL数据库工作中遇到关于sql_mode的情况,特学习记录一下
废话不多说直接上错误提示,哈哈哈 bug开始!!!!
INSERT INTO mmb_user (openid,mobile,wxmobile,password,age,realnm,nicknm,avatar,height,weight,sex,country,province,city,invdcd,unionid,create_date,valid) VALUES (?,?, ?,?, ?, ?,?,?,?,?,?,?, ?,?, ?, ?, now(), \'1\' ) on duplicate key update nicknm = ?, openid = ?,avatar = ?, update_date = now(),valid = \'1\'
### Cause: java.sql.SQLSyntaxErrorException: In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column \'ygdb.mmb.id\'; this is incompatible with sql_mode=only_full_group_by
; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column \'ygdb.mmb.id\'; this is incompatible with sql_mode=only_full_group_by
来源:https://www.cnblogs.com/diaoyulin/p/15597288.html
图文来源于网络,如有侵权请联系删除。