top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to set NULL values in JDBC PreparedStatement?

0 votes
416 views
How to set NULL values in JDBC PreparedStatement?
posted Aug 21, 2017 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

We can use PreparedStatement setNull() method to bind the null variable to a parameter. The setNull method takes index and SQL Types as argument, for example

ps.setNull(10, java.sql.Types.INTEGER);.
answer Aug 22, 2017 by Pankaj Singh
...