I have an sql column PROTOCOL, it is nullable and has a constraint on the table
PROTOCOL
PROTOCOL IN (1, 2, 3)
Also since it is nullabl
Try using.
pst.setNull(4, java.sql.Types.INTEGER); //pst is prepared statement instance.
Interface PreparedStatement.setNull API
Mapping of java.sql.Types to SQL types
P.S. : Edited to reflect Java 8 updates.