Quoth Germán Herrera <germanh1...@gmail.com>, on 2010-10-16 00:10:23 -0300:
> As you may know, both MySQL and SQL Server engines would refuse to run
> the last query, indicating an error because not all columns come from
> aggregate functions and there is no "group by" clause..
> 
> Is this left on purpose?, can this behavior be switched? (already
> searched in the Documentation, and in the list of pragmas and couldn't
> find anything).

I doubt it has to be "left on purpose"; in fact it's more the
opposite.  I would think it's more work to detect queries that use
combined aggregate and non-aggregate results in ill-specified ways,
depending on how one's query compiler is built, so it's just a matter
of an extra feature that was never implemented because there was no
need for it.

Is there a reason you want this type of query to raise an error?  Is
it just a matter of a safety net, wanting to know when you're doing
something that's not that well-defined?  The query is semantically not
very good, but there are many other kinds of meaningless queries that
are valid SQL; it's not really SQLite's job to check that for you.

(I don't know what the SQL92 standard has to say on this, FWIW.)

   ---> Drake Wilson
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to