1

I need to create mysql stored procedure which makes more than one insert at a time. To prevent many calls to database I need to use stored procedure. I have java.util.List<MyEntity> object of my data. MyEntity is an object which holds data which has to be inserted into table.

My question is how should I pass List object as mysql procedure parameter?

Thanks in advance.

1 Answer 1

2

There's another way: batch the calls to the database. You don't need a stored procedure for this. Look at java.sql.PreparedStatement.addBatch.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.