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 are keys in sql?

544


How much does sqlite cost?

553


What pl/sql package consists of?

633


What are commit, rollback, and savepoint?

569


How do you concatenate in sql?

548






what is subquery? : Sql dba

564


Table A Table B 1 1 2 1 3 1. Union & union all --> A Union B , A Union all B 2. Minus , Intersect --> A minus B , B Minus A , A Intersect B 3. Joins A join B , A Left Join B A Right Join B , A full Join B 4. %Type - Uses & Benifit 5. Truncate & Delete 6. Pragma Autonomus Transaction 7. how to Perform DDL from function or procedure 8. Can we have DML inside Function 9. Rank & Dense Rank diffrence 10. Water Mark in Oracle 11. Index , Can we have index in all column of table if no then why ?

531


What is trigger in pl sql?

555


What is sql key?

512


What is a heap in sql?

525


How do we accept inputs from user during runtime?

544


What is Difference Between Unique and Primary Key Constraints?

604


Does normalization improve performance?

552


how can we optimize or increase the speed of a mysql select query? : Sql dba

504


what are the security recommendations while using mysql? : Sql dba

576