This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I need to retrieve a single record matching two fields, call them jib and jab. The query is easy enough:
I know there will only be a single record, because I have a unique key constraint on jib and jab. However, jab can be null, and equality comparison doesn't work with nulls. I tried something like:
Checking parameters with "IS NULL" apparently doesn't work though, even though it works in ordinary SQL. The only solution I can think of is to write two queries and force the application to decide which one to use. I'd appreciate any suggestions!