Home  >  Article  >  Database  >  How to disable ONLY_FULL_GROUP_BY in MySQL?

How to disable ONLY_FULL_GROUP_BY in MySQL?

PHPz
PHPzforward
2023-09-06 09:17:06958browse

How to disable ONLY_FULL_GROUP_BY in MySQL?

You can enable ONLY_FULL_GROUP_BY in MySQL as shown in the following query -

mysql> SET sql_mode = 'ONLY_FULL_GROUP_BY';
Query OK, 0 rows affected (0.01 sec)

As shown above, we can enable ONLY_FULL_GROUP_BY with the help of the SET command.

Disable ONLY_FULL_GROUP_BY with the help of the following query -

mysql> SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
Query OK, 0 rows affected (0.04 sec)

We have successfully disabled ONLY_FULL_GROUP_BY.

The above is the detailed content of How to disable ONLY_FULL_GROUP_BY in MySQL?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete