I would certainly think the way MySQL treats this is correct. SQLite may be trying to assume what you meant, and interpreting. Which may confuse the client if they don't know what they're asking.

Will Leshner wrote:
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?



--
Scott Baker
Canby Telephone - Network Administrator - RHCE
Ph: 503.266.8253

Reply via email to