Re: Counting Null Values

From: GHouck <hksys_at_teleport.com>
Date: 2000/06/22
Message-ID: <395272A6.A20_at_teleport.com>#1/1


Jake,

Try:

  select count(*) from mytable where mycolumn is null;

  [or]

  select count(*),nvl(mycolumn,0) from mytable group by nvl(mycolumn,0)

  (or make '0' some other non-occurring value)

Yours,

Geoff Houck
systems hk
hksys_at_teleport.com
http://www.teleport.com/~hksys

Jake wrote:
>
> Using SQL*Plus I'm trying to count a number column. This works fine except
> I need to count the null values as well. No success using NVL funtion.
> Code is COUNT(NVL(column, 0)). Any suggestions?
>
> Jake
Received on Thu Jun 22 2000 - 00:00:00 CEST

Original text of this message