tags: Mysql
Check
select @@sql_mode;
SQL_MODE results returned by mysql8
Remove the only_full_group_by this SQL_Mode, the operation is as follows:
SET SESSION sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
Then execute the SQL statement will not report an error, this is just modifying SQL_MODE in this connection. When the mysql connection is disconnected, the above setting will be invalid.
UPDATE users,
(
SELECT
IFNULL( sum( temp_duration ), 0 ) AS total_duration,
user_id
FROM
(
SELECT
activity_registrations.*
FROM
activity_registrations
LEFT JOIN activities ON activities.id = activity_registrations.activity_id
WHERE
area_3 = 441948
AND activities.enabled = 1
AND checked_out_at IS NOT NULL
GROUP BY
join_activity_time,
activity_registrations.user_id
ORDER BY
join_activity_time ASC
) t
GROUP BY
user_id
) a
SET volunteer_time = total_duration , rank_score = ROUND(total_duration / 3600)
WHERE
users.id = a.user_id
The above statement can be successful!
Specific error: [Err] 1055-Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column ‘information_schema.PROFILING.SEQ’ which is not functionally depende...
Error scenario Today, I have a project that I just came down on my computer. When I log in to enter the home page, I reported a string of this is incompatible with sql_mode = only_full_group_by error,...
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 ...
Borrowing the analysis of this big cow First, the principle level This error occurs in mysql version 5.7 and above problems that will occur: The default sql configuration of mysql 5.7 ve...
problem: the reason: solve:...
During MySQL operation, the following errors are often reported: [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column ‘information_schema.PRO...
The specific errors are as follows: the reason: MySQL 5.7.5 and above functions depend on the detection function. If ONLY_FULL_GROUP_BY SQL mode is enabled (by default), MySQL will reject select lists...
my situation : Mysql 5.7.21 version runs sql and reports the same error. The same sql runs directly locally without error. However, this error occurs when connecting to Mysql on the server (even runni...
Original link: https://blog.csdn.net/loveliness_peri/article/details/88051316 The reason for the problem: there are more in sql_mode:ONLY_FULL_GROUP_BY Use SQL statements to query this configur...
When using MySQL to perform Group By query statement, error: problem causes The SQL standard does not allow the Select list, a Having condition statement, or a grouse in the Group By in the Order by s...