MySQL错误-this is incompatible with sql_mode=only_full_group_by完美解决方案
1.错误
1 | Expression #1 of SELECT list is not in GROUP BY clause and contains |
2. 查看sql_mode的语句
1 | select @@GLOBAL.sql_mode; |
3. 解决
1 | set SQL_MODE = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; |