Quick Tip: How to Permanently Change SQL Mode in MySQL
Category: BrunoS, configuration, Database, Debugging & Deployment, development environment, group, mysql, PHP, quick-tip, sql
I was working on a legacy project recently and needed to import some data from MySQL 5.5. All the queries in the code worked perfectly in MySQL 5.5, so I assumed an upgrade to 5.7 would be seamless. Not so.
First I got errors due to DateTime columns being populated with zeros during import, then when running this query:
select * from ebay_order_items where z_shipmentno is null and ExternalTransactionID is not null and orderstatus = 'Completed' and timestamp > '2015-02-25' group by ExternalTransactionID order by timestamp desc
I got this:
Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column '1066export.ebay_order_items.TransactionID' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Continue reading %Quick Tip: How to Permanently Change SQL Mode in MySQL%
LEAVE A REPLY
You must be logged in to post a comment.