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 the difference between partitioning and sharding?
Write a program that shows the usage of while loop to calculate the average of user entered numbers and entry of more numbers are stopped by entering number 0?
What are the advantages of pl sql?
mention if it is possible to import data directly from t-sql commands without using sql server integration services? If yes, what are the commands? : Transact sql
What is parameter substitution in sql?
What is difference between cursor and trigger?
Is null operator in sql?
Can you rollback after commit?
Where are my tempfiles, I don't see them in v$datafile or dba_data_file?
How do I find sql profiler?
What is difference between sql and excel?
What is implicit cursor in pl sql?
How do I create a sql database?
What is the purpose of my sql?
Which table is left in left join?