Skip to content
Advertisement

Oracle PL/SQL: how to execute a procedure with a varray as out parameter?

I’m writing a stored procedure that will receive a code and return one or more VARCHAR2 values. The number of values will vary according to the code the procedure receives.

I don’t know if this is the best approach (needless to say I’m a beginner), but I created a user-defined type and a table to store these values.

Then, I wrote the procedure as follows:

This is where I’m stuck. How should this procedure be executed to return the values I’ve stored in the list column?

Advertisement

Answer

you have to declare a variable and pass it in you proc.

to see the results you can itarate through your varray:

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