setNull(int parameterIndex, int sqlType)

Syntax:

void setNull(int parameterIndex,
             int sqlType)
             throws SQLException

Description:

Sets the designated parameter to SQL NULL.

Note: You must specify the parameter's SQL type.

Parameters:

parameterIndex

of the first parameter is 1, the second is 2, ...

sqlType

the SQL type code defined in java.sql.Types

Throws:

SQLException - if a database access error occurs, parameterIndex is less than 1 or greater than the number of parameters, or the prepared statement has been closed

Reference:

For more information, reference JDBC documentation for: PreparedStatement.setNull(int, int)