Last active
February 2, 2024 13:19
-
-
Save gauravds/c2cefb428d9741282e88afb1c3afa17b to your computer and use it in GitHub Desktop.
sql mode to support ONLY_FULL_GROUP_BY by setting this `NO_ENGINE_SUBSTITUTION`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT @@sql_mode; | |
SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION'; | |
SET SESSION sql_mode = 'NO_ENGINE_SUBSTITUTION'; | |
-- other commands | |
SELECT @@sql_mode; | |
SET GLOBAL sql_mode=(SELECT CONCAT(@@sql_mode,',ONLY_FULL_GROUP_BY')); | |
SET GLOBAL sql_mode = 'ONLY_FULL_GROUP_BY'; | |
SET SESSION sql_mode='ONLY_FULL_GROUP_BY'; | |
-- ref https://stackoverflow.com/a/35018178/1084917 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment