sql_mode=only_full_group_by

MySQL关于only_full_group_by错误的解决方案

https://jingyan.baidu.com/article/5552ef471a15d2108ffbc9ef.html

 



select @@sql_mode;


set @@sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';

set global sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';

对于已存在的数据库,则需要在对应的数据下执行:
set sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';

 

 

-----

https://blog.csdn.net/weixin_46553523/article/details/121807006

 

SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));

posted @ 2021-12-17 12:27  tonggc1668  阅读(85)  评论(0编辑  收藏  举报