Q:

where clause with Is null and not in

I have an issue with where clause. I want "is null" and "<>" functionality of a column together. Wrote something like this but it removes rows with t1.column1= test and is null . I want to remove only test. 
where (t1.column1 is null 
or t2.column1 is null
or t2.column2 is null)
and t1.column1 <> 'test'

Thanks in advance. 

A:

You could try:
WHERE  (   t1.column1 != 'test'
       AND (t2.column1 IS NULL OR t2.column2 IS NULL)
       )
    OR t1.column1 IS NULL

to get your desired results.

