"Mariano" <mariano.calandra@gmail.com> a écrit dans le message de news:
1182606785.877789.107950@m36g2000hse.googlegroups. com...
|I need to create a procedure that accept as input parameter an array
| of integer, how can realize it?
|
| PROCEDURE add_allPaz( ??? ) AS
| BEGIN
| // understand how many elements there are in array
| END;
|
| What should I use at place of ???
|
SQL> create or replace type my_array is table of number
2 /
Type created.
SQL> create or replace procedure p (p my_array)
2 is
3 begin
4 for i in p.first..p.last loop
5 dbms_output.put_line('p('||i||')='||p(i));
6 end loop;
7 end;
8 /
Procedure created.
SQL> exec p(my_array(1,4,7,19,5));
p(1)=1
p(2)=4
p(3)=7
p(4)=19
p(5)=5
PL/SQL procedure successfully completed.
Regards
Michel Cadot