去掉ONLY_FULL_GROUP_BY

2020-09-09  本文已影响0人  Yluozi

检索时报错:
Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'kweb_product.product_field_match_mapp.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

查询操作:

select @@global.sql_mode

ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION

去掉ONLY_FULL_GROUP_BY并修改

set @@global.sql_mode
=’STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION’;

注意:!!!!!上面的单引号为‘ ` ’ esc下面的符号

上一篇 下一篇

猜你喜欢

热点阅读