Code:
select table1.field1, table1.field2, table2.field1, table2.field2
from table1, table2
where
table2.field2 is not null and 
table2.field2 is not null and
table2.fieldc = 5 and
table2.fieldd = table1.fieldd
group by table1.field1, table1.field2, table2.field1, table2.field2
this query works if table2.field1 and table2.field2 are not null.
But, if these fields are null it does returns nothing.

It is ok if table2.field1, table2.field2 return as null.

how to modify above query to do this?.