본문 바로가기
서버/DB

mysql group by error

by 아카이sun 2018. 9. 21.

Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column '컬럼명' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by



만약 해당 오류가 난다면 mysql strict mode와 관련이 있다.



sql mode 보기


- show variables like 'sql_mode';


my.cnf에 sql_mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION" 이런식으로 적용하면 된다.


'서버 > DB' 카테고리의 다른 글

postgresql에서 connect by 를 써보기.  (0) 2020.04.06
오라클 날짜 관련  (0) 2019.02.27
오라클 random함수 사용하기  (0) 2018.11.29
mysql utf8mb4설정 ( 이모티콘 설정 )  (0) 2018.08.08
mysql 원격접속 허용하기  (0) 2017.08.30

댓글