Mr. Boy Mr. Boy - 5 months ago 7
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.