"This is incompative with sql_mode = only_full_group_by" Quick solution method

tags: Laptop  database  mysql

1. Reasons for the problem

MySQL 5.7, realize the dependencies of detection functions. If it is enabledONLY_FULL_GROUP_BY SQL mode (default),MySQLRefuse to choose a list query, conditions, or command list refers to the non -aggregate column is neitherGROUP BYThe specified function in the clause does not rely on them. (Before 5.7,MySQLDependence and dependencies of not detecting functionsONLY_FULL_GROUP_BYDo not open in the default situation.ONLY_FULL_GROUP_BY,forGROUP BYPlastful operation, if inSELECTThe column in the middleGROUP BYIt appears, then thisSQLIt's illegal, because the list is not thereGROUP BYFrom the sentence, that is, the found column must be inGROUP BYOtherwise, an error will be reported later, or this field appears in the polymerization function.

2. Solution

useselect @@GLOBAL.sql_mode,CheckONLY_FULL_GROUP_BYWhether to enable, as follows

select @@global.sql_mode;

Get the query data and remove the insideONLY_FULL_GROUP_BY Mode, thenset go back

set @@global.sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';

If it still does not take effect, it runs:

set sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';

Intelligent Recommendation

MySQL query statistics report errors This is incompative with sql_mode = only_full_group_by

1. Problem description SQL query statistics abnormal 2. Analysis of the cause The literal understanding is the limitation of sql_model = only_full_group_by, which causes SQL that can be checked normal...

Solve from SQL statement to solve the error of SQL —This is incompative with sql_mode = only_full_group_by

Solve from SQL statement to solve the error of SQL —This is incompative with sql_mode = only_full_group_by When writing projects, use the same SQL group statement in different environments. Some...

Solution: this is incompatible with sql_mode=only_full_group_by

Solution: this is incompatible with sql_mode=only_full_group_by The reason for this error is: The default sql_mode of higher version mysql (client server version 5.7 or above) contains ONLY_FULL_GROUP...

Solution to [this is incompatible with sql_mode=only_full_group_by]

Look at the reported SQL error first After a MySQL database version change, there was a problem with the project's SQL The above error message: Non-aggregated column ‘XXX’ is not functiona...

SQL_MODE = ONLY_FULL_GROUP_BY Problem Solution

The cause of the problem: It is because SQL_MODE is configured in 5.7 or later, SQL_MODE is configured online, and you need the group by all the fields that appear in Select. So for the database setin...

More Recommendation

This is incompatible with sql_mode = only_full_group_by solution

This is incompatible with sql_mode = only_full_group_by solution cause: Solution...

【Sql_mode = only_full_group_by problem solution】

1. Question: Caused by: java.sql.SQLSyntaxErrorException: Expression #6 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘supply_heat.record.supply_quality’ which...

Solution sql_mode = only_full_group_by problem

Since I am a Docker installed mysql: 5.7 and file mapping You need to modify my.conf and mysqld.cnf (the modified local ones) my.conf 2. Mysqld.cnf add Because there is nothing in the My.conf file und...

"reference

Reference is a new language feature introduced by C++. It is one of the important contents commonly used in C++. Correct and flexible use of references can make the program simple and efficient. I fou...

Input.GetAxis("") Input.GetAxisRaw("")

Input.GetAxis Get axis static function GetAxis (axisName : string) : float Descriptiondescription Returns the value of the virtual axis identified by axisName. Returns the value in the ...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top