GROUP BY가 포함된 SQL문을 실행하려는 과정에서 오류가 발생했다.
column ' ' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
해결 방법
아래의 stackoverflow 내용을 통해 문제를 해결할 수 있었다.
SELECT list is not in GROUP BY clause and contains nonaggregated column .... incompatible with sql_mode=only_full_group_by
I'm using MySQL 5.7.13 on my windows PC with WAMP Server. My problem is while executing this query SELECT * FROM `tbl_customer_pod_uploads` WHERE `load_id` = '78' AND `status` = 'Active' GROU...
stackoverflow.com
아래의 SQL문을 작성해 @@sql_mode에서 'ONLY_FULL_GROUP_BY'를 제거하면 된다.
SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
이후 @@sql_mode에서 해당 내용이 없어졌는지 확인한다.
select @@sql_mode;

'Error' 카테고리의 다른 글
| Typescript - This is not the tsc command you are looking for (0) | 2025.04.19 |
|---|---|
| Sublime Text - Package Control이 검색되지 않는 문제(MAC) (1) | 2025.03.11 |
| Spring - 406 Not Acceptable 발생 (0) | 2024.08.05 |
| Spring - Swagger Response 정보가 보이지 않는 문제 (0) | 2024.07.30 |
| Spring - 'Failed to convert from type [java.lang.String] to type [java.util.Date] for value [ ]' (3) | 2024.05.05 |