MySql版本原因导致查询出错

MySql版本原因导致查询出错

由于在新的机器上测试数据时,原mysql版本低,报错

1055 - Expression #1 of SELECT list is not in GROUP BY clause and
contains nonaggregated column ‘btc.a.applicant_unit’ which is not
functionally dependent on columns in GROUP BY clause; this is
incompatible with sql_mode=only_full_group_by

解决方法:直接在mysql中运行以下代码(对应数据库)

set global sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 游动-白 设计师:白松林 返回首页