null handling: WHERE clause "IS NULL" versus "=?" and setNull

10 views
Skip to first unread message

Mark Addleman

unread,
Mar 12, 2012, 12:35:21 PM3/12/12
to h2-da...@googlegroups.com
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
TestCase.java
Reply all
Reply to author
Forward
0 new messages