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 difference between delete and truncate statement in sql?
How do I run a script in sql developer?
how can we know the number of days between two given dates using mysql? : Sql dba
what is 'mysqlcheck'? : Sql dba
What is the largest value that can be stored in a byte data field?
What are the advantages of indexing?
Can we use update in sql function?
What is a procedure in pl sql?
Explain the structure of pl/sql in brief.
Is sql microsoft?
what is the use of double ampersand (&&) in sql queries?
how to select unique records from a table? : Sql dba
What are the two types of exceptions.
what is schema? : Sql dba
How can you know that statistics should be updated?