错误原因:select 列中没有在group by 列中
SELECT list is not in GROUP BY clause and contains nonaggregated column 'xxxxx' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
修改my.ini文件 添加配置项
[mysqld]
sql-mod[mysqld]e=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
当遇到`only_full_group_by` SQL模式错误,意味着SELECT中的列未包含在GROUP BY子句中且未进行聚合操作。为消除此错误,可以在MySQL的配置文件my.ini中添加`sql-mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES`。这将允许查询执行,同时保持数据完整性。
2456

被折叠的 条评论
为什么被折叠?



