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 / mathan r
create table clustering
(
id1 varchar(10),
id2 varchar(10),
id3 varchar(10)
)
insert into clustering
select '1','2',null
union
select '1',null,'3'
union all
select null,'2','3'
select sum(nullable) from
(select count(case when id1 = null then '1' else '2' end) 'nullable' from clustering where id1 is null
union all
select count(case when id2 = null then '1' else '2' end)'nullable' from clustering where id2 is null
union all
select count(case when id3 = null then '1' else '2' end)'nullable' from clustering where id3 is null ) tmp
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How many rows can sqlite handle?
Can we insert in view in sql?
How do you modify a column in sql?
How to fetch values from testtable1 that are not in testtable2 without using not keyword?
What is difference between sql and mysql?
Can we use rowid as primary key?
what is the difference between delete and truncate commands? : Sql dba
How do I find duplicates in two columns?
explain normalization concept? : Sql dba
How to load data with sql*loader?
What are pl sql procedures?
Can unique keys be null?
Which column of the user triggers data dictionary view displays the database event that will fire the trigger?
What is not equal in sql?
How delete a row in sql?