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 / chiranjib
SELECT SUM( CASE WHEN A IS NULL THEN 1
ELSE
CASE WHEN B IS NULL THEN 1
ELSE
CASE WHEN C IS NULL THEN 1
ELSE
CASE WHEN D IS NULL THEN 1
ELSE
0
END
END
END
END ) Tot_Null
FROM T
/
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is a delimiter in sas?
what is 'mysqlcheck'? : Sql dba
How do I find duplicates in the same column?
Can we rollback after truncate?
Is sql developer case sensitive?
What is the most important ddl statements in sql are?
explain the options of myisamchk to improve the performance of a table. : Sql dba
Why triggers are used?
What is sql in java?
What is sql partition function?
what is innodb? : Sql dba
can a stored procedure call itself or recursive stored procedure? How much level sp nesting is possible? : Sql dba
how to check server status with 'mysqladmin'? : Sql dba
What is the difference between union and union all command?
How many types of indexes are there in sql?