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 embedded sql in db2?
How do I run a pl sql procedure in sql developer?
What is the difference between joins?
how to get help information from the server? : Sql dba
Explain what is sql*plus?
write an sql query to find names of employee start with 'a'? : Sql dba
What is sql and also describe types of sql statements?
What is difference between inner join and cross join?
How to revise and re-run the last sql command?
What is a table partition?
Which column in the user.triggers data dictionary view shows that the trigger is a pl/sql trigger?
what are the differences between public, private, protected, static, transient, final and volatile? : Sql dba
What is sqlite used for?
what is a foreign key ? : Sql dba
Why do we use procedures in pl sql?