| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: does a table always need a PK?
"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 - 16:57:45 CDT
![]() |
![]() |