Sorry if this is very basic.
Here is what i noticed
Here are the tables:
Table1 Table2
ID Value ID Value
1 (null) 1 0
2 2 2 2
3 (null) 3 3
So i used the following statement:
Select T1.ID,T1.Value,T2.value
from
Table1 T1,
Table2 T2
where
T1.ID=T2.ID
and T1.Value<>T2.Value;
I was expecting the output to show 1,3 ID but it showed nothing not i am confused suppose i want to see all values when one table has null for other table value how can i do that.
Well, the problem is that comparisons to NULL always result in FALSE, except for
IS NULL. So the clause should be:Or something that matches the NULL values.
By the way, you should also use proper join syntax. So, the query should look more like: