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 is the current version of postgresql?
What action do you have to perform before retrieving data from the next result set of a stored procedure ?
What are the different types of database management systems?
Can you do multiple joins in sql?
Explain what is a database?
what are all the different types of indexes? : Sql dba
What are functions in sql?
What is a natural join sql?
How do you write a subquery?
How to change sql*plus system settings?
What is procedure and function?
What are the sql commands?
What is sql scripting?
Can a primary key be a foreign key?
What is structural independence and why is it important?