Mysql this is incompatible with sql_mode=only_full_group_by

MySQL reasonable set of sql_mode

sql_mode is easily overlooked variable, the default value is a null value, in this arrangement is to allow some illegal operations, such as allowing some invalid data is inserted. This value must be set to strict mode in a production environment, the development, test environment database must be set so that the development and testing phases can find the problem.

sql model used to solve the following types of problems

(1) By setting sql mode, can perform different stringency data check, data preparation of effective protection.

(2) by setting the sql model is loose mode to ensure the most sql sql-standard syntax, such applications when migrating between different databases, you do not need to make huge changes to business sql.

(3) prior to data migration between different databases, so that the data can be provided by the SQL Mode MySQL more easily migrate to the target database.

sql_mode common values ​​are as follows:

ONLY_FULL_GROUP_BY:

For GROUP BY aggregate operations, if a column in the SELECT, does not appear in a GROUP BY, then the SQL is not legitimate, because the column is not in the GROUP BY clause



NO_AUTO_VALUE_ON_ZERO:

 The value is inserted from the impact of the growth column. In the default setting, the insert 0 or NULL on behalf of a self-generated growth value. If you want to insert a value of 0, and that column is self-growth, this option comes in handy.



STRICT_TRANS_TABLES:

 In this mode, if a value can not be inserted into a transaction table, interrupting the current operation, no limitation on the non-transactional table

NO_ZERO_IN_DATE:

 In strict mode, the date and month of zero is not allowed



NO_ZERO_DATE:

 This value is set, mysql database does not allow zero-insertion date, insert zero dates will throw an error instead of a warning.



ERROR_FOR_DIVISION_BY_ZERO:

 INSERT or UPDATE in the process, if the data is zero, an error instead of a warning is generated. If this mode is not given, then return NULL when data MySQL zero



NO_AUTO_CREATE_USER:

 GRANT prohibit users create a blank password



NO_ENGINE_SUBSTITUTION:

 If you need a storage engine is disabled or not compiled, then throw an error. When this value is not set, the default storage engine replacement, and throws an exception



PIPES_AS_CONCAT:

 The "||" operator not regarded as connection strings or operator, and that the Oracle database is the same, and also blending functions similar string Concat



ANSI_QUOTES:

 ANSI_QUOTES then enabled, can not be used to refer to a string double quotation marks, because it is interpreted as an identifier



 ORACLE is provided sql_mode equivalents: PIPES_AS_CONCAT, ANSI_QUOTES, IGNORE_SPACE, NO_KEY_OPTIONS, NO_TABLE_OPTIONS, NO_FIELD_OPTIONS, NO_AUTO_CREATE_USER.

Perform the following two to OK!
SET SESSION sql_mode = ‘’;
SET GLOBAL sql_mode = ‘’;

Intelligent Recommendation

mysql 5.7 this is incompatible with sql_mode=only_full_group_by

MySQL 5.7 version The default SQL configuration is: SQL_Mode = "Only_Full_Group_by", this configuration strictly implements "SQL92 Standard". SayNo aggregate functions, using group...

MySQL error [this is incompatible with sql_mode = only_full_group_by]

Report error message: Reporting error Mysql 5.7.5 and above function dependencies. If ONLY_FULL_GROUP_BY is enabled SQL Mode (By default), MySQL will refuse to select a list, the Having condition, or ...

Mysql: MySQL-this is incompatible with sql_mode=only_full_group_by error resolution

First, the background Previously used local server in development, local is mysql5.6, there is a problem when switching to online server Prompt MySQL-this is incompatible with sql_mode=only_full_group...

Fractional resolution MySql this is incompatible with sql_mode=only_full_group_by

** Minute solution this is incompatible with sql_mode=only_full_group_by ** Second, the solution note Some students use navicat for mysql to execute temporary programs. The following error may be repo...

More Recommendation

MySQL-this is incompatible with sql_mode=only_full_group_by error solution

MAMP MySql configuration file path under Mac /Applications/MAMP/tmp/mysql/my.cnf First, the principle level You need to modify the mysql configuration file to force the specified ONLY_FULL_GROUP_BY at...

mysql [Err] 1055 this is incompatible with sql_mode=only_full_group_by

mysql [Err] 1055 this is incompatible with sql_mode=only_full_group_by Error log: The reason is clear The last sentence: sql_mode=only_full_group_by Query sql-model: select @@global.sql_mode; After th...

MySQL-this is incompatible with sql_mode = only_full_group_by Error Resolution

MySQL-this is incompatible with sql_mode = only_full_group_by Error Resolution Edit Profile Linux in: my.cnf In Windows: my.ini Add a line at the bottom Mysql restart the service to address Note: Usin...

Resolved: mysql error: 1055 - this is incompatible with sql_mode = only_full_group_by

mysql query error: [Err] 1055 - Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'tase1.ai.home_url' which is not functionally dependent on columns in GROUP BY ...

Under mysql this is incompatible with sql_mode = only_full_group_by Solutions

Local testing is no problem, then deploy to client-server reported the following error: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #1 of SELECT list is not in GROUP BY claus...

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

Top