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 rowid in sql?

1051


When should I use nosql database?

1056


how to fetch alternate records from a table? : Sql dba

1163


Why do we use procedures in sql?

1138


Enlist the advantages of sql.

1050


What does over partition by mean in sql?

1039


What is the difference between rename and alias?

1385


What is pl sql in oracle?

1092


Can we insert in view in sql?

1100


What jobs use sql?

1029


What are the types of records?

1033


how many sql ddl commands are supported by 'mysql'? : Sql dba

1059


What are dml commands?

1069


How do you use a while loop in pl sql?

1050


Does a join table need a primary key?

994