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
What are keys in sql?
How much does sqlite cost?
What pl/sql package consists of?
What are commit, rollback, and savepoint?
How do you concatenate in sql?
what is subquery? : Sql dba
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 ?
What is trigger in pl sql?
What is sql key?
What is a heap in sql?
How do we accept inputs from user during runtime?
What is Difference Between Unique and Primary Key Constraints?
Does normalization improve performance?
how can we optimize or increase the speed of a mysql select query? : Sql dba
what are the security recommendations while using mysql? : Sql dba