View Single Post

   
  #1 (permalink)  
Old 02-28-2008, 08:14 AM
alex
 
Posts: n/a
Default weird results: (null!=null)??

I've got this select:

select * from table1,table2 where table1.field1=table2.field1 and
table1.field2=table2.field2

and it does not return any rows for the elements where both "field2" are
null.

the only way i can get those rows is using this query:

select * from table1,table2 where table1.field1=table2.field1 and
table1.field2=table2.field2 or (table1.field2 is null and table2.field2
is null)


is this the normal behaviour? is there any other way in which those rows
where both fields are null are returned?

alex.
Reply With Quote