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 / sivanagaraju

SELECT C1.COL1,C2.COL2,C3.COL3
FROM (SELECT COL1 FROM COLL WHERE COL1 <>'NULL') C1,
(SELECT COL2 FROM COLL WHERE COL2 <>'NULL') C2,
(SELECT COL3 FROM COLL WHERE COL3<>'NULL') C3
WHERE C1.COL1 <>'NULL' AND C2.COL2<>'NULL';

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the current version of postgresql?

1021


What action do you have to perform before retrieving data from the next result set of a stored procedure ?

2539


What are the different types of database management systems?

962


Can you do multiple joins in sql?

989


Explain what is a database?

1051


what are all the different types of indexes? : Sql dba

1014


What are functions in sql?

920


What is a natural join sql?

930


How do you write a subquery?

978


How to change sql*plus system settings?

1010


What is procedure and function?

939


What are the sql commands?

1117


What is sql scripting?

1051


Can a primary key be a foreign key?

981


What is structural independence and why is it important?

992