setNull()
method of PreparedStatement interface, we can set the null value to an index. The syntax of the method is given below.void setNull(int parameterIndex, int sqlType) throws SQLException
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);