Say I have a table defined and populated as follows:
CREATE TABLE test (a TEXT);
INSERT INTO test (a) VALUES ('hello');
INSERT INTO test (a) VALUES ('hello');
INSERT INTO test (a) VALUES ('hello');
And I perform the following query:
SELECT rowid,count(a) FROM test
In SQLite I get back:
3|hello
But in MySQL I get back an error:
#1140 - Mixing of GROUP columns (MIN(),MAX(),COUNT()...) with no
GROUP columns is illegal if there is no GROUP BY clause
I'm wondering if MySQL isn't right to treat this as an error?