Skip to content
Advertisement

Fetch multiple rows with PL/SQL procedure

Procedure:

This procedure works for me. I am executing the procedure with below code:

Execution:

I have to call the procedure in java with JDBC. So how can I call the procedure in java by above execution code?

Advertisement

Answer

Use a collection (which you can create using CREATE TYPE ... AS TABLE OF ...) or VARRAY (like the built-in VARRAYs SYS.ODCI*LIST) and BULK COLLECT INTO:

Or just return the cursor (without an INTO clause):

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement