Why does this only return row # 2? the name on line # 3 is not foo and should.
Others said what to do about it. As to why this is so, null represents the value unknown . The value for the name column in row 3 may be foo . We do not know this, because the meaning is unknown.
The where clause must be evaluated to true to return a string. name <> 'foo' not true and it is not false , it is unknown.
source share