0

How to pass an array of Strings from java to stored procedure ?

What is the IN parameter in the stored procedure to receive an array ?

What I am trying to do is, for all the values(Ids) present in the array, I fetch the rowfrom table X and insert it into table X_Audit

2

1 Answer 1

2

I just spend the last few days working out a lot of JDBC related stuff, and one of my challenges was working out the answer to this exact question. I wrote up my solution on my blog: http://betteratoracle.com/posts/26-passing-arrays-between-java-and-oracle-procedures

You need to create some collection types on the database, and make the input parameters of the procedure have a type of the collections you created. See the article I posted above for full details and working code.

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.