which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mod

在执行查询时,报错:SELECT * FROM `ziyuan` GROUP BY `modular_id`;

解决办法:

set @@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即可正常执行sql.

posted @ 2019-10-16 10:55  星空天宇  阅读(612)  评论(0编辑  收藏  举报