| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: does a table always need a PK?
"Lee Fesperman" <firstsql_at_ix.netcom.com> wrote in message
news:3F553E89.5AD9_at_ix.netcom.com...
> You might replace count(*) with sum(1), but count(a + b) only counts
tuples where (a+b)
> is not NULL.
The general rule is: "If you have a problem with null, just add a switch operator":
sum(case when a+b is null then 0 else 1 end) Received on Tue Sep 02 2003 - 20:23:47 CDT
![]() |
![]() |