query to find count of null values in the entire table using oracle

Posted by Sharmagoldi781 under Oracle on 7/30/2014 | Points: 10 | Views : 562 | Status : [Member] | Replies : 3
query to find count of null values in the entire table using oracle




Responses

Posted by: Bandi on: 7/30/2014 [Member] [MVP] Platinum | Points: 25

Up
0
Down
select count(*) from test where ColumnName is null;


Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Sharmagoldi781, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sharmagoldi781 on: 7/30/2014 [Member] Starter | Points: 25

Up
0
Down
i do not need it on particular column level i need it on the entire table level.

Sharmagoldi781, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bandi on: 8/1/2014 [Member] [MVP] Platinum | Points: 25

Up
0
Down
may be get the null count for each column and then Sum up the values

select sum(decode(Col1,null,1,0)) + sum(decode(Col2,null,1,0)) + sum(decode(Col3,null,1,0)) as "NullCount"
from myTable;


Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Sharmagoldi781, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response