From the BlogSubscribe Now

Force MySQL Group By to function like SQL Server

Note: MySQL has now made this enabled by default starting in MySQL 5.7.5! Should’ve happened a really long time ago, but hey, better late than never!

MySQL’s group by functionality allows you to not group by all relevant columns. If you’re not careful and if you’re used to how SQL Server or Oracle work, this can bite you. To turn on “ONLY_FULL_GROUP_BY”, you simply input the following command in the mysql command line:

mysql>SET sql_mode = 'ONLY_FULL_GROUP_BY'

Speak Your Mind

*

five × four =