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 database white box testing and black box testing?

1163


how would you get the current date in mysql? : Sql dba

1020


Is record in oracle pl sql?

1017


What is the difference between the sql*loader and import utilities? : aql loader

1100


What is thread join () in threading?

1058


Why join is faster than subquery?

1167


Is primary key clustered or nonclustered?

1065


How do you use a while loop in pl sql?

1057


Describe types of sql statements?

1108


what is a view? : Sql dba

1137


what are the drivers in mysql? : Sql dba

1061


What is pl sql script?

1088


How many subqueries can be nested in a statement?

1042


How are functions and procedures called in PL/SQL?

1310


how to concatenate two character strings? : Sql dba

1164