MySQL 5.7.9 version sql_mode = only_full_group_by problem MySQL 5.7.9 version sql_mode = only_full_group_by problem

用到GROUP BY 语句查询时com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'col_user_6.a.START_TIME' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by错误

 

Solution (modified Global): performs set global sql_mode = ''; the sql_mode into non only_full_group_by mode. Verify that the entry into force SELECT @@ GLOBAL.sql_mode or SELECT @@ sql_mode

 

Performing (just modified session level, only the current session commencement) set session sql_mode = ''; the sql_mode into non only_full_group_by mode. Verify that the entry into force SELECT @@ GLOBAL.sql_mode or SELECT @@ sql_mode

 

 

用到GROUP BY 语句查询时com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'col_user_6.a.START_TIME' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by错误

 

Solution (modified Global): performs set global sql_mode = ''; the sql_mode into non only_full_group_by mode. Verify that the entry into force SELECT @@ GLOBAL.sql_mode or SELECT @@ sql_mode

 

Performing (just modified session level, only the current session commencement) set session sql_mode = ''; the sql_mode into non only_full_group_by mode. Verify that the entry into force SELECT @@ GLOBAL.sql_mode or SELECT @@ sql_mode

 

 

Guess you like

Origin www.cnblogs.com/maaosheng/p/11619200.html