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?
Java: Insert multiple rows into MySQL with PreparedStatement covers batching multiple INSERTs into one
Share
You can use
executeBatch(). See this exampleNote: I haven’t validated example by running in my local, but as per documentation it should work.