Solve the MySQL 5.7.9 version sql_mode=only_full_group_by problem

Solve the MySQL 5.7.9 version sql_mode=only_full_group_by problem

MySQL 5.7.9 version sql_mode=only_full_group_by issue

When using the GROUP BY statement to query, the error 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 occurs

Solution:

Execute SET GLOBAL sql_mode = ''; to change sql_mode to a mode other than only_full_group_by.

Verify that SELECT @@GLOBAL.sql_mode or SELECT @@sql_mode is in effect

SET sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE

The above is the editor's introduction to solving the MySQL 5.7.9 version sql_mode=only_full_group_by problem. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

You may also be interested in:
  • Reasons and solutions for MySQL sql_mode modification not taking effect
  • Detailed explanation of MySQL sql_mode query and setting
  • Detailed explanation of viewing and setting SQL Mode in MySQL
  • Detailed explanation of sql_mode mode example in MySQL
  • Django2 connects to MySQL and model test example analysis
  • Detailed explanation on reasonable settings of MySQL sql_mode
  • MySQL sql_mode analysis and setting explanation
  • The pitfalls and solutions caused by the default value of sql_mode in MySQL 5.7
  • The perfect solution for MySql version problem sql_mode=only_full_group_by
  • Detailed explanation of SQL Mode usage in MySQL
  • mysql sql_mode="" function description
  • Detailed explanation of the use of MySQL sql_mode

<<:  JS realizes the calculation of the total price of goods in the shopping cart

>>:  Solution to nginx hiding version number and WEB server information

Recommend

Example code comparing different syntax formats of vue3

The default template method is similar to vue2, u...

Analyze the working principle of Tomcat

SpringBoot is like a giant python, slowly winding...

Detailed explanation of how to write mysql not equal to null and equal to null

1. Table structure 2. Table data 3. The query tea...

How to hide the version number and web page cache time in Nginx

Nginx optimization---hiding version number and we...

The difference between ENTRYPOINT and CMD in Dockerfile

In the Docker system learning tutorial, we learne...

Tomcat maxPostSize setting implementation process analysis

1. Why set maxPostSize? The tomcat container has ...

How to solve the high concurrency problem in MySQL database

Preface We all know that startups initially use m...

6 Ways to Elegantly Handle Objects in JavaScript

Table of contents Preface 1. Object.freeze() 2. O...

Analyzing the four transaction isolation levels in MySQL through examples

Preface In database operations, in order to effec...

MySQL database basic syntax and operation

MySQL database basic syntax DDL Operations Create...

Summary of the minesweeping project implemented in JS

This article shares the summary of the JS mineswe...

Detailed explanation of how to install MySQL on Alibaba Cloud

As a lightweight open source database, MySQL is w...

Introduction to user management under Linux system

Table of contents 1. The significance of users an...

JavaScript BOM Explained

Table of contents 1. BOM Introduction 1. JavaScri...