Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is out parameter used for eventhough return statement can also be used in pl/sql?

1081


What are the possible values that can be stored in a boolean data field?

1002


What is a Mapplet?

1125


What does the hierarchical profiler does?

1062


Explain two easy sql optimizations.

1016


What are sql functions? Describe in brief different types of sql functions?

1104


What is sqlerrm?

941


How to set up sql*plus output format in oracle?

1039


Can ddl statements be used in pl/sql?

1145


What is the importance of sqlcode and sqlerrm?

1356


How many rows can sqlite handle?

1119


What is character functions?

1064


Difference between table function and pipelined function?

1028


when MSQL8.0 is in market

2080


How to get help at the sql prompt?

1118