Mr. Boy Mr. Boy - 9 months ago 40
MySQL Question

Can Java batch calls to SQL stored procedures?

Java: Insert multiple rows into MySQL with PreparedStatement covers batching multiple INSERTs into one operation. I wondered if it is possible to do the same with calls to stored procedures, more specifically with MySQL? If so, what statement class would be used?


You can use executeBatch(). See this example

Note: I haven't validated example by running in my local, but as per documentation it should work.