SQL 설정에 따라 GROUP BY 구문에 오류가 발생할 수 있다는 점을 최근 프로젝트를 진행하며 깨달았다.
간단히 말하면 GROUP BY절에 쿼리의 SELECT 절에 있는 컬럼이 모두 포함되어야 한다는 점.
https://jjon.tistory.com/entry/ONLYFULLGROUPBY-SQL-%EC%BF%BC%EB%A6%AC-%EC%8B%A4%ED%8C%A8
ONLY_FULL_GROUP_BY SQL 쿼리 실패
MySQL을 업그레이드 한 후 정상적으로 수행되던 쿼리가 "ERROR 1055 (42000): Expression #2 of SELECT list is not in GROUP BY clause" 에러와 함께 수행이 되지 않는 경우가 있습니다. ERROR 1055 (42000): Expression #2 of SELEC
jjon.tistory.com
'공부하자 > 개발 중 이것저것' 카테고리의 다른 글
@Transient 어노테이션 (0) | 2023.09.20 |
---|---|
Apache에서 제공하는 클래스 StringEscapeUtils.unescapeHtml4 (0) | 2023.07.28 |
react vs. vue 차이점 참고 보기 (0) | 2023.07.24 |
aws 오류 [ com.amazonaws.services.sns.model.EndpointDisabledException: Endpoint is disabled (Service: AmazonSNS; Status Code: 400; Error Code: EndpointDisabled; Request ID: ......) ] (0) | 2023.07.20 |
[Sourcetree]소스트리가 실행이 되지 않을 때 (0) | 2023.07.03 |