jeudi 4 décembre 2014

Select rows with same id but null and some other value in another column for that id


I want to get only rows having a value NUll and some other value than NULL for a particular username column .


If both rows have null for that particular username or both have some values other than null then it should not appear in output. below is example sample and output. How it can be done using sql query?


username col2



a abc
a ef
b null
b null
c der
c null


output


user name col2



c der
c null




Aucun commentaire:

Enregistrer un commentaire