Re: GROUP BY

From: Lennart <Erik.Lennart.Jonsson_at_gmail.com>
Date: 21 May 2007 00:17:08 -0700
Message-ID: <1179731828.868717.211450_at_x18g2000prd.googlegroups.com>


On May 21, 2:55 am, "V.J. Kumar" <vjkm..._at_gmail.com> wrote:
> "V.J. Kumar" <vjkm..._at_gmail.com> wrote innews:Xns9936C58B97D81vdghher@194.177.96.26:
>
>
>
> >>I'm curios cause DB2 returns 1 row, and
>
> > Apparently, the IBM folks need to read the standard !
>
> >> apparently others return 0 rows. I can imagine both definitions, and
> >> would like to check out what the standard actually says.
>
> Actually, after rereading the standard I think I was unfair towards 'the
> IBM folks'. Whether or not 'select 1 from T group by ()' should return
> one or zero rows, depends on whether or not an empty set can be
> partitioned, which in its turn depends on axioms set partitioning should
> satisfy. If you accept, as the formal set theory does, that an empty
> set can be (the only possible) partition of itself, then returning one
> row with the above query is OK. Since the 2003 standard is silent on
> this point, implementations returning either one or zero rows are both
> 'right'!
>
>

Thanks, I cant seem to find my draft doc. I find this and other "incompletness" in the sql standard a bit annoying. I suspect that it has something to do with that different vendors is pushing their own technology into the standard, instead of figuring out what would be best.

/Lennart

[...] Received on Mon May 21 2007 - 09:17:08 CEST

Original text of this message