您的位置:首页 > 大数据 > 人工智能

ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains

2018-08-13 21:59 645 查看

mysql在查询命令时出错: ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'DBname.table.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

 

解决办法:

打开数据库:mysql  -u root  -p

然后输入下列命令:

[code]SET @@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";

重新打开数据库,问题解决。

阅读更多
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐