为了账号安全,请及时绑定邮箱和手机立即绑定

最后一个指令跑不了 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'test.p.type_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'test.p.type_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by



正在回答

3 回答

第三页有个关于group by的解答

0 回复 有任何疑惑可以回复我~

group by 的列 要么必须出现在 select 的查找列中,要么必须是以聚合函数的形式使用

0 回复 有任何疑惑可以回复我~

在mysql的配置文件下my.ini中的[mysqld]下加入

sql-mode=

"STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"

如果原来有sql -mode=...就把原来的用#注释掉

,

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
与MySQL的零距离接触
  • 参与学习       396886    人
  • 解答问题       3353    个

本课程涵盖全部MySQL数据库的基础,学习MySQL数据库的基础知识

进入课程

最后一个指令跑不了 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'test.p.type_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信