MySQL Forums
Forum List  »  Newbie

Re: Query in mysql 5.5 fails in mysql server version 5.7.16
Posted by: Phillip Ward
Date: July 19, 2017 07:42AM

Whilst earlier versions of MySQL let you "get away" with this, it is generally a bad idea to select columns that are neither grouped by nor part of an aggregate function.
You have no control over which value you get back from rows within the grouped set.

You can configure MySQL to allow the "old" behaviour but I would suggest reworking your query to avoid this practice - you never know when somebody will come up with a "bright idea" of moving your database to another DBMS.

Regards, Phill W.

Options: ReplyQuote


Subject
Written By
Posted
Re: Query in mysql 5.5 fails in mysql server version 5.7.16
July 19, 2017 07:42AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.