问题
The following only wants a primitive boolean (true or false).
psmt.setBoolean(5, boolean) ; //wants primitive
What if I want to set the bit to null?
Sql server =
[bit] NULL
回答1:
You could use setNull
preparedStatement.setNull(5, Types.BOOLEAN);
来源:https://stackoverflow.com/questions/26184937/how-can-i-set-bit-column-to-null