美文网首页
去掉ONLY_FULL_GROUP_BY

去掉ONLY_FULL_GROUP_BY

作者: Yluozi | 来源:发表于2020-09-09 14:31 被阅读0次

检索时报错:
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下面的符号

相关文章

网友评论

      本文标题:去掉ONLY_FULL_GROUP_BY

      本文链接:https://www.haomeiwen.com/subject/whpeektx.html