에러 내용
Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'LG_NAVER_FINANCE.naver_finance_db.sd_idx' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'DB명.테이블명' which is not functionally dependent on columns in GROUP BY clause;
this is incompatible with sql_mode=only_full_group_by
아래 쿼리로 현재 DB에 설정되어있는 sql_mode를 볼 수 있다.
SELECT @@sql_mode;
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
보다싶이 ONLY_FULL_GROUP_BY가 들어있다. MySQL 5.7 버전 이상부터 바뀌었다고 한다.
버전은 아래 쿼리로 조회할 수 있다.
SELECT VERSION()
현재 사용중인 MySQL 5.7.32 버전이다.
'Development > MySql' 카테고리의 다른 글
[MySQL] 생성된 컬럼에 auto_increment 속성 부여하기 (0) | 2023.08.25 |
---|---|
[MySQL] MySQL server has gone away (0) | 2023.08.11 |
[MongoDB] MongoDB를 MySQL으로 마이그레이션 하기 (0) | 2023.08.07 |
[MySQL] 테이블 깨졌을 때 복구하기 (0) | 2023.08.04 |
[MySQL] checking permissions (0) | 2023.05.04 |