i have table T!.

A B C D
NULL 1 2 3
4 NULL 5 6
7 8 NULL 9
10 11 12 NULL.


I WANT COUNT OF NULL VALUES IN TABLE. WRITE A QUERY.

Answer Posted / abinash_mishra

SELECT a_null + b_null + c_null + d_null
FROM (SELECT COUNT (DECODE (a, NULL, 1, NULL)) a_null,
COUNT (DECODE (b, NULL, 1, NULL)) b_null,
COUNT (DECODE (c, NULL, 1, NULL)) c_null,
COUNT (DECODE (d, NULL, 1, NULL)) d_null
FROM t_null);

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a delimiter in sas?

730


How many sql statements are used? Define them.

774


what is bdb (berkeleydb)? : Sql dba

751


Can one improve the performance of sql*loader? : aql loader

773


what are properties of a transaction? : Sql dba

758






What is dense_rank?

697


What is mutating sql table?

824


What is trigger and stored procedure in sql?

752


What is sqlcommand?

749


What is date functions?

729


What are pl/sql packages?

760


Is coalesce faster than isnull?

701


What mean sql?

738


How to assign sql query results to pl sql variables?

674


what are the non-standard sql commands supported by 'mysql'? : Sql dba

772