Subject Re: [Firebird-Java] Re: problem: PreparedStatement with "? IS NULL"
Author Roman Rokytskyy
> with one parameter assignment makes more sense than
>
> WHERE column = ? OR (column IS NULL AND ? IS NULL)

I would say that is more or less correct condition for JDBC (named
parameters are not supported in prepared statements by the specification).
And I understand what you meant with that condition.

> I found out that i can workaround by using:
>
> WHERE column = ? OR (column IS NULL AND ? = 0)
>
> and instead of using a setNull for the second parameter, i use a
> setInt that is 0 on a null value and 1 on something else.

Yes, that seems to be correct workaround.

Roman