如何在 MySQL 中启用 ONLY_FULL_GROUP_BY

2022-01-15 00:00:00 group-by mariadb mysql

我使用 SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY','')); 禁用了 ONLY_FULL_GROUP_BY.现在我想恢复默认设置.

I have disabled ONLY_FULL_GROUP_BY by using SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));. Now I want to restore the default settings.

是否可以在MySQL中再次启用ONLY_FULL_GROUP_BY?

Is it possible to enable the ONLY_FULL_GROUP_BY in MySQL again?

提前致谢

推荐答案

为避免其他配置出现问题,请使用CONCAT:

To avoid problems with other configurations, use CONCAT:

SET GLOBAL sql_mode=(SELECT CONCAT(@@sql_mode, ',ONLY_FULL_GROUP_BY'));

相关文章