Server/MySQL

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


,

알림

이 블로그는 구글에서 제공한 크롬에 최적화 되어있고, 네이버에서 제공한 나눔글꼴이 적용되어 있습니다.

카운터

Today :
Yesterday :
Total :

태그