setNull(int parameterIndex, int sqlType, String typeName)

Syntax:

void setNull(int parameterIndex,
             int sqlType,
             String typeName)
             throws SQLException

Description:

Sets the designated parameter to SQL NULL. This version of the method setNull should be used for user-defined types and REF type parameters. Examples of user-defined types include: STRUCT, DISTINCT, JAVA_OBJECT, and named array types.

Parameters:

parameterIndex

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

sqlType

the SQL type code defined in java.sql.Types

typeName

the fully-qualified name of an SQL user-defined type; ignored if the parameter is not a user-defined type or REF

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, String)