On Mon, Mar 12, 2012 at 6:41 PM, Mark Addleman <[email protected]>wrote:

> Attached is a test case that demonstrates a difference in how where clause
> handles NULL.  In the first case, my SELECT includes "WHERE c IS NULL"  My
> second case has "WHERE c=?" and then I do preparedStatement.setNull(1,
> Types.VARCHAR).  The queries return different results.  There must be some
> difference in the semantics of the two queries but I don't know what it
> is.  Can someone explain it?  Thanks
>

NULL = NULL -> false
NULL <> NULL -> false

and so on. That's the standard, and raison d'ĂȘtre for IS NULL/IS NOT NULL
sql operators. Any good intro to databases should explain it

   Vasile Rotaru

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to