Re: does a table always need a PK?

From: Mikito Harakiri <mikharakiri_at_ywho.com>
Date: Tue, 2 Sep 2003 14:57:45 -0700
Message-ID: <Nv85b.19$1o4.1173_at_news.oracle.com>


"Christopher Browne" <cbbrowne_at_acm.org> wrote in message news:bj30il$eoev7$3_at_ID-125932.news.uni-berlin.de...
> Consider:
>
> select count(a + b) from table_t;
>
> The nature of the addition there is different from the nature of the
> COUNT()ing. Perhaps "a + b" should be resolved by reduction of + over
> a and b. But that's only "perhaps." If the thing inside the
> aggregate was (a*a - b*b + 25), it is no longer obvious that it is
> appropriate to recursively use reduction on the components.

Since we can express count via sum, where

select count(a + b) from table_t;

becomes

select sum(1) from table_t;

could I suggest that "count" is redundant operator, so that we can drop it from consideration altogether? Received on Tue Sep 02 2003 - 23:57:45 CEST

Original text of this message