You could pass the IDs as an array to your procedure. You can then extract the IDs from the array and form the dynamic SQL statement. The SQL statement should be opened as a REF cursor and then passed as an out parameter in the procedure, so the Java program can use the result set.
Dig Deeper on Using Oracle PL-SQL
Related Q&A from Azim Fahmi
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.