ERROR 1055 (42000): Expression # 1 of SELECT list is not in GROUP BY clause and contains nonaggregated ...... error solutions to the problem!

Sql statement execution error:

ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'test.fruits.f_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

(Error 1055 (42000): the expression of the selection list is not the GROUP BY clause 1, and the column comprising unpolymerized "test.fruits.f_id", it does not rely on the GROUP BY clause is listed in the function; This sQL_mode = only_full_group_by not compatible)

Solution:

Enter in mysql

mysql> set sql_mode ='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';

Again the new query to OK!

Guess you like

Origin www.cnblogs.com/jjking/p/11494268.html