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 Histogram?
What is normalization? How many normalization forms are there?
How is a PL/SQL code compiled?
Is pl sql different from sql?
How do you write an index?
What is meant by <> in sql?
what are rollup and cube in t-sql? : Transact sql
How does one use sql*loader to load images, sound clips and documents? : aql loader
How to add, remove, modify users using sql?
What is trigger with example?
Where are my tempfiles, I don't see them in v$datafile or dba_data_file?
how to get a list of columns in an existing table? : Sql dba
difference between anonymous blocks and sub-programs.
What are conditional predicates?
Could you please provide oca (oracle 10g) dumps for my certification ?