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 / ajitnayak

select distinct col1 from samp
where col1 is not null
union all
select distinct col2 from samp
where col2 is not null

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of a secondary key?

685


Is keyword pl sql?

732


What is data type in sql?

731


Why is partition used in sql?

787


How to run pl sql program in mysql?

683






How do you respond to dementia behavior?

724


What is graph sql?

721


how to use in conditions? : Sql dba

697


write an sql query to find names of employee start with 'a'? : Sql dba

779


What is sql table?

690


Can a composite key be null?

718


Is like operator in sql case sensitive?

739


What do you understand by pl/sql packages?

770


Does mysql support pl sql?

813


What is raid? How does it help storage of databases?

802