Re: GROUP BY

From: Lennart <erik.lennart.jonsson_at_gmail.com>
Date: Sun, 20 May 2007 20:19:07 +0200
Message-ID: <f2q3er$62s$1_at_registered.motzarella.org>


V.J. Kumar wrote:
[...]

>> 
>> which I imagine is the same as:
>> 
>> select 1 from t1 group by ()

>
> In other implemmentations in accordance with the 2003 standard, you will
> still obtain zero rows, either with 'group by ()' or 'group by grouping
> sets (())'. Not surprising really.
>

I think I misread your first post. I thought you where questioning the syntax of group by () (AFAIK it was not valid in SQL92, but introduced in SQL99). Anyhow, I think I have the SQL2003 draft lying around some where, can you point me to where in the standard the semantics of group by () is defined? I'm curios cause DB2 returns 1 row, and apparently others return 0 rows. I can imagine both definitions, and would like to check out what the standard actually says.

Thanks
/Lennart

[...] Received on Sun May 20 2007 - 20:19:07 CEST

Original text of this message