I have some code that will potentially insert a huge number of rows into a table. I'm currently using Spring's JdbcTemplate.update
to execute the SQL, but I have a concern.
The method, like bare JDBC's Statement.executeUpdate
to which it delegates, returns an int
, where the maximum value is of course 231 = 2147483648.
So, the question is, what does JDBC do in such a situation? Return MAX_INTEGER, some other number, throw an exception? Or perhaps the behavior is platform- (or driver-) specific? I'm supporting both SQL Server (through jTDS) and Oracle (through the thin driver).