Derby's handling of NULL values

前端 未结 4 495
深忆病人
深忆病人 2020-12-19 18:08

I am new to Derby and I noticed that I face similar problems as when using the DB2 RDBMS as far as null values are concerned. The Derby documentation states, th

4条回答
  •  粉色の甜心
    2020-12-19 18:24

    What if you leave the column values as question-mark substitution values in your PreparedStatement, and then set the values at runtime using PreparedStatement.setObject(N, null)?

    In general, your library will prefer to provide column values by substituting parameter values, to handle issues like quotation marks in strings, datatype conversions, etc., and I think that this general substitution mechanism should handle your null value problems as well.

提交回复
热议问题