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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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