sql_mode only_full_group_by无法禁用

时间:2019-10-01 14:44:24

标签: mysql group-by sql-mode

我试图通过编辑cnf文件来禁用only_full_group_by并重新启动服务器。当我检查

select @@sql_mode

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。但是,当我运行查询时,它会向我抛出以下错误,

ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column '<field_hidden>' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

我不确定实际上禁用了only_full_group_by的原因,为什么仍然要检查它。知道为什么吗?

0 个答案:

没有答案