0
我們已經升級了MYSQL
數據庫;MYSQL升級GROUP BY子句;這是不符合sql_mode = only_full_group_by
SELECT l.subscriberid AS subscriberid FROM email_list_subscribers AS l, email_queues AS q
WHERE q.recipient = l.subscriberid AND q.queueid = 2343 AND queuetype = 'send'
AND l.listid IN (31) GROUP BY l.emailaddress HAVING COUNT(l.emailaddress) > 1
,現在我們得到
#1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'emailmarketer.l.subscriberid' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
我們能做些什麼?
謝謝,我會盡力的。爲什麼我的選擇適用於v5.6而不是5.7? – mbrc
@mbrc。 。 。這不起作用的原因是由於SQL模式。 –
我可以只爲sql 5.7啓用sql模式嗎? – mbrc