Skip to Main Content

Japanese

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to pass PL/SQL table type parameter to a SP

Vinod Kumar G MMar 7 2016 — edited Apr 5 2016

Hi ,

How can we pas PL/SQL table parameter type  to Stored procedure as input parameter.

Thanks

Vinod

Comments

889268

something like this do you need?

{code}

set serveroutput on;

create type complexType as Object

  (c_id number);

 

create type complexTable is table of complexType;

create or replace procedure complexProx(v complexTable)

is

begin

  for i in 1..v.count

  loop

    dbms_output.put_line(v(i).c_id);

  end loop;

end;

declare

  v_id complexTable := complexTable();

begin 

  v_id.extend;

  for i in 1..10 

  loop

    v_id.extend;

    v_id(i) := complexType(i);

  end loop;

  complexProx(v_id);

end;

{code}

Vinod Kumar G M

Thanks

1 - 2
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on May 3 2016
Added on Mar 7 2016
2 comments
22,848 views