Hi Bart,

First of all, you clearly try to start a new subject here, so
please don't reply to something completely different, but start
a new thread. TIA.

On Thu, 14 Dec 2006 12:15:57 -0000 (GMT), you wrote:

>Just wondering about the implementation of GROUP BY in SQLite.
>It looks I can do:
>
>select
>field1,
>field2,
>field3
>from
>table
>group by
>field1
>
>and I will get the last row in the field1 group.

In SQL there isn't something like a "last row", unless you
specify ORDER BY. You get "some row", next time you run the
query you might get another one.

>This is fine and I can use that, but I thought that the SQL standard
>was that all non-aggregate fields should be in the GROUP BY clause.

That's right. So if you value your application you can't use it,
even though sqlite doesn't throw an error at the moment.

>I just tried it in Interbase and the above construction 
>indeed doesn't work with the error:
>
>SQL error code = -104, invalid column reference
>
>Runs fine though in SQLite.
>
>Is this a known feature?

I wouldn't call it a feature, and you'd better not rely on this
behaviour. 

>RBS

HTH
-- 
  (  Kees Nuyt
  )
c[_]

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to