I have a table like
table1(id int,name VC,description VC);
This table contains 100s of records. For description column it has some white spaces and null values I want to eliminate the rows for which the description value is Null or whitespace?
I tried in this way
select * from table1 where description not in('',NULL); //Displaying nothing
But
select * from table1 where description in('',NULL);// It is displaying all the rows which contains white spaces but not Nulls
I am confused. IN operator accepts varchar also, I am getting correct result if I wont use NOT, but Why I am not getting If I use NOt.
Thanks in advance..
you need to use IS NOT NULL to compare null values