Jump to content

Mysql: Difference between revisions

From tango.info wiki
No edit summary
Line 11: Line 11:
* rewrite query with ANY_VALUE(column)
* rewrite query with ANY_VALUE(column)
* disable:  
* disable:  
  SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
  <nowiki>SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));</nowiki>
http://dev.mysql.com/doc/refman/5.7/en/group-by-handling.html
http://dev.mysql.com/doc/refman/5.7/en/group-by-handling.html
"In MySQL 5.7.5 and higher, ONLY_FULL_GROUP_BY also affects handling of queries that use DISTINCT and ORDER BY"
"In MySQL 5.7.5 and higher, ONLY_FULL_GROUP_BY also affects handling of queries that use DISTINCT and ORDER BY"

Revision as of 2017-01-10T04:27:54


natural sort
order by cast(substr(album_name,1,2))

MySQL 5.7.5 - ONLY_FULL_GROUP_BY

http://stackoverflow.com/questions/23921117/disable-only-full-group-by

  • rewrite query with ANY_VALUE(column)
  • disable:
SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));

http://dev.mysql.com/doc/refman/5.7/en/group-by-handling.html "In MySQL 5.7.5 and higher, ONLY_FULL_GROUP_BY also affects handling of queries that use DISTINCT and ORDER BY"