only_full_group_by error handling tip
yo hello guys
when using mysql 5.7 some query including having or group by would occur an error like
error 1055 420000
this is incompatible with sql_mode=only_full_group_by
The ONLY_FULL_GROUP_BY mode is ... ummm... like some.... ..... help programmer query more specified...... yeah.. maybe...
(to tell the truth.. i dunno exactly meaning of the mode .. cuz I hate the design of mysql documentation.. it's hard to read..)
so... just change the global sql mode. (not only for the session you are now working)
set global sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
never query like this
set global sql_mode='';
Because sql_mode has default value. If you wanna see, below query shows you.
select @@sql_mode
'Server > MySQL' 카테고리의 다른 글
mysql set character to each attribute. collate 문자열 쿼리로 설정 (0) | 2016.06.22 |
---|---|
MySQL 설치후 가장먼저 해야할 보안 설정 (0) | 2016.02.07 |
mysql 실시간 innoDB buffer 확인하기 (0) | 2016.01.02 |