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...

wirte a query to remove null? following table are

col1 col2 col3
dinesh null null
null suresh null
null null prakesh
i want the output like

col1 col2 col3
dinesh suresh prkaesh

Answer Posted / ajitnayak

select distinct col1 from samp
where col1 is not null
union all
select distinct col2 from samp
where col2 is not null

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of cursors in pl/sql?

1138


What are triggers and its uses?

1050


What are the operators in sql?

1033


What are the two types of cursors in pl sql?

1082


what is the difference between undefined value and null value? : Sql dba

1104


Is sql dba a good career? : SQL DBA

995


What is trigger in sql?

1104


What is secondary key?

935


What is scope and visibility in PL/SQL?

1205


Is left join inner or outer?

1023


What is embedded sql with example?

1056


How do I access sql anywhere database?

973


What is a constraint? Tell me about its various levels.

1164


how can we take a backup of a mysql table and how can we restore it. ? : Sql dba

975


Explain the purpose of %type and %rowtype data types?

930