Gotcha.  Thanks for the explanation.  Looks like I need to bone up on my 
Chris Date :)

One more question:  Given the spec, what value is the setNull method in 
PreparedStatement?  

On Monday, March 12, 2012 9:59:44 AM UTC-7, Vasile Rotaru wrote:
>
>
>
> On Mon, Mar 12, 2012 at 6:41 PM, Mark Addleman 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 view this discussion on the web visit 
https://groups.google.com/d/msg/h2-database/-/Rz_8W38Nc5QJ.
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