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 need of merge statement?
What is plpgsql language?
column A column b | output 10 7 | 10 5 8 | 8 7 -9 | 7 3 5 | 5 0 6 | 6 Write a sql query to print such output.
What is a join query?
Mention what is the use of function "module procedure" in pl/sql?
Why do we use sql constraints?
What are the different type of joins in sql?
what is the difference between where clause and having clause? : Sql dba
What is relationship? How many types of relationship are there?
What is nosql example?
What are the two types of periodical indexes?
Why are aggregate functions called so?
what is the command line end user interface - mysql? : Sql dba
What is the usage of nvl function?
how do you know the version of your mysql server? : Sql dba