CREATE OR REPLACE TYPE list_of_int IS
VARRAY(10) OF INT;
CREATE OR REPLACE PROCEDURE my_procedure(
in_lista in list_of_int
)
AS
...
exec my_procedure( [1,2,3] );
How to execute procedure with input parametr VARRAY?
CREATE OR REPLACE TYPE list_of_int IS
VARRAY(10) OF INT;
CREATE OR REPLACE PROCEDURE my_procedure(
in_lista in list_of_int
)
AS
...
exec my_procedure( [1,2,3] );
How to execute procedure with input parametr VARRAY?
Copyright © 2021 Jogjafile Inc.
You can do something like this
Practically, though, I have yet to encounter an instance where it made sense to declare a
varray
type. It would almost certainly make more sense to declare a nested table type which doesn't limit the number of elements you can have in your collection (well, I think you're limited to 2^32 or whatever you can fit in PGA but if you're doing something seriously wrong if you get close to that). I can't think of a situation where I'd want to have code that intentionally dies if someone wants to pass an 11 element list.