According to the java docs of PreparedStatement.setNull: \"Note: You must specify the parameter\'s SQL type\". What is the reason that the method requires the SQL t
When it comes to Oracle it would be very unwise to use varchar2 towards other datatypes. This might fool the optimizer and you could get an bad execution plan. For instance filtering on a date column using a timestamp datatype in your bind, Oracle could end up reading all your rows converting all dates to timestamp, then filtering out the wanted rows. If you have a index on your date column, it could even get worse (if oracle chose to use it) - doing single reads on your oracle blocks.
--Lasse